After trying to duplicate a nginx to another, I worry about nginx not starting.

nginx -t says that the config syntax is ok.

In nginx.conf it's told to log errors: error_log /var/log/nginx/error.log;

The error.log exists and it is re-created when starting, but always empty.

After /etc/init.d/nginx start or nginx , there is no notice or error in the shell and also not a line in the error.log. Anyways, ps -A|grep nginx tells me that there is nothing started.

Where to find an error message or how to find out what went wrong.

There seems to be no "verbose" mode for nginx :-(

2 Answers 2


Just type (replace the path to your conf as necessary)

nginx -c /etc/nginx/nginx.conf

And it will print the error to screen.

  • 2
    that's what i did. this is telling me nothing, no notice, no error or info :-(
    – ledy
    May 18, 2013 at 13:53
  • thanks, there was a broken sym link to another version that i did not remove --purge before.
    – ledy
    May 18, 2013 at 15:48
  • @ledy did nginx -c show that error or did you find it independently? Dec 2, 2015 at 15:14

For other guys like me:

My problem was on the nginx.pid file. The process was not running, but the file existed, and this prevented to run it. Deleting the file (in my case, /var/run/nginx.pid ), worked.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .