Error Setting up Server Blocks on Nginx
I am going through How To Set Up nginx Virtual Hosts (Server Blocks) on CentOS 6.
I’ve previously set up a LEMP stack and moved my web root to /var/www. That works correctly.
On step 5 of the tutorial, I get an error when restarting nginx. I run
sudo systemctl restart nginx, and when I do so I get the following error:
Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' for details.
systemctl status nginx.service produces this message: http://hastebin.com/fuwovafeya.avrasm
I’ve double-checked that nginx has access to read and write the files referenced in the tutorial. When I remove virtual.conf, the server starts normally. Here’s my virtual.conf: http://hastebin.com/ihidaqehit.avrasm
Any thoughts on what I might be doing wrong here? Thanks in advance for your 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.