2

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 :-(

3

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

nginx -c /etc/nginx/nginx.conf

And it will print the error to screen.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.