Nginx Startup Failure Whilst attempting to Implement Reverse Proxy

I’ve encountered a setup issue whilst attempting to implement a reverse proxy for Libretime.

Following the instructions I was able to generate a certificate for the domain but I’m now unable to start nginx and am presented with the following error message:

Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.
root@ubuntu-s-1vcpu-2gb-ams3-01:~# 

**systemctl status nginx.service**
● nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Tue 2023-04-11 14:32:45 BST; 18s ago
       Docs: man:nginx(8)
    Process: 3587 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)

Apr 11 14:32:45 ubuntu-s-1vcpu-2gb-ams3-01 systemd[1]: Starting A high performance web server and a reverse proxy server...
Apr 11 14:32:45 ubuntu-s-1vcpu-2gb-ams3-01 nginx[3587]: nginx: [warn] server name "" has suspicious symbols in /etc/nginx/site>
Apr 11 14:32:45 ubuntu-s-1vcpu-2gb-ams3-01 nginx[3587]: nginx: [warn] server name "" has suspicious symbols in /etc/nginx/site>
Apr 11 14:32:45 ubuntu-s-1vcpu-2gb-ams3-01 nginx[3587]: nginx: [emerg] host not found in upstream "libretime" in /etc/nginx/sites-enabled/libretime.con>
Apr 11 14:32:45 ubuntu-s-1vcpu-2gb-ams3-01 nginx[3587]: nginx: configuration file /etc/nginx/nginx.conf test failed
Apr 11 14:32:45 ubuntu-s-1vcpu-2gb-ams3-01 systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Apr 11 14:32:45 ubuntu-s-1vcpu-2gb-ams3-01 systemd[1]: nginx.service: Failed with result 'exit-code'.
Apr 11 14:32:45 ubuntu-s-1vcpu-2gb-ams3-01 systemd[1]: Failed to start A high performance web server and a reverse proxy server.

Nginx Error Log:

2023/04/11 14:27:07 [emerg] 3072#3072: host not found in upstream "libretime" in /etc/nginx/sites-enabled/libretime.conf:66
2023/04/11 14:30:19 [warn] 3344#3344: server name "" has suspicious symbols in /etc/nginx/sites-enabled/libretime.conf:45
2023/04/11 14:30:19 [warn] 3344#3344: server name "" has suspicious symbols in /etc/nginx/sites-enabled/libretime.conf:53
2023/04/11 14:30:19 [emerg] 3344#3344: host not found in upstream "libretime" in /etc/nginx/sites-enabled/libretime.conf:66
2023/04/11 14:32:45 [warn] 3587#3587: server name "" has suspicious symbols in /etc/nginx/sites-enabled/libretime.conf:45
2023/04/11 14:32:45 [warn] 3587#3587: server name "" has suspicious symbols in /etc/nginx/sites-enabled/libretime.conf:53
2023/04/11 14:32:45 [emerg] 3587#3587: host not found in upstream "libretime" in /etc/nginx/sites-enabled/libretime.conf:66

Not sure of my next move given I’ve checked the various conf files and the only conclusion I’ve drawn is that it may be down to not entering the FQDN for resolution that’s why I’d appreciate some help clarifying whether my assumption is correct or point me in the right direction to resolve my issue.

Many Thanks

Hi,

You probably want to include your nginx configuration file so we can give you an answer to your problem.

2023/04/11 14:27:07 [emerg] 3072#3072: host not found in upstream “libretime” in /etc/nginx/sites-enabled/libretime.conf:66

This tells me that you probably copy pasted the nginx config from the docs without editing the fields that required changes.

Hi Joola,

Thanks, sussed that one out; now have to figure out why I see the nginx server block as opposed to the Libretime Web page (figuring it’s a host thing rather than Libretime functionality)

Thanks for reaching out; appreciated.