By retador
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!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Would you be able to provide the output from the following command?
tail -30 /var/log/nginx/error.log
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 or journal output.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.