Main image
27th April
2009
written by Nick Anderson

nginx is a high performance HTTP and mail proxy server written by Igor Sysoev.

I’m not sure what the init scripts do for other distros but it seems a bit of an oversight to leave out checking the config file when running the init script.

Add this line to your nginx init script right after the text -x $DAEMON line to make it check the config before proceeding to start stop or restart the service.

$DAEMON -t > /dev/null 2>&1
if [ $? -ne 0 ]; then
        echo "Configuration file has errors, try $DAEMON -t"
        exit 0
fi
Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Reddit
  • Slashdot
  • TwitThis
Tags:

Leave a Reply

To submit your comment, click the image below where it asks you to... Clickcha - The One-click Captcha