I followed the official DO tutorial in setting up Nginx server blocks and somehow always end up with an error message that is quite cryptic for me as a beginner. Going back every step I did before I checked for little typing errors, but no semicolons or other things seemed to be missing. Can someone give me a hint what this error message means?
sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
sudo systemctl restart nginx
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.
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: en
Active: failed (Result: exit-code) since Fri 2018-12-28 10:42:09 UTC; 10s ago
Docs: man:nginx(8)
Process: 4686 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code
Process: 4676 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process
Thanks a lot in advance for any help!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $100 of credit to try our products over 60 days!
@retador
Would you be able to provide the output from the following command?
Tailing the logs may provide a bit more specific detail on what may be causing NGINX to fail to start if you’re not seeing anything in the
systemctl
orjournal
output.