Nginx failing to reload - how to track down why?

Check syslog (/var/log/syslog) for messages about config file issues.

From the commandline you can run:

nginx -c /etc/nginx/nginx.conf -t

to have nginx check your configuration for errors.


Run this command you can find problem.

sudo nginx -t

You should probably check for errors in /var/log/nginx/error.log.

In my case I did no add the port for ipv6. You should also do this (in case you are running nginx on a port other than 80):

listen [::]:8000 default_server ipv6only=on;