Nginx fails to restart but doesn't seem to log any errors

May 8, 2015 3.1k views
Ubuntu Nginx Logging

I have an Ubuntu droplet running Nginx and I’m trying to restart the service: service nginx restart but it says [fail].

There’s nothing in the error log: /var/log/nginx/error.log

What am I missing?

1 Answer

Enter this line:

sudo nginx -t

It should give you more details about what went wrong.

Have another answer? Share your knowledge.