Created
December 12, 2012 18:22
-
-
Save TheHippo/4270241 to your computer and use it in GitHub Desktop.
Upstart config for running Nginx.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
description "nginx http daemon" | |
author "Philipp Klose" | |
start on (filesystem and net-device-up IFACE=lo) | |
stop on runlevel [!2345] | |
env DAEMON=/opt/nginx/sbin/nginx | |
env PID=/opt/nginx/logs/nginx.pid | |
expect fork | |
respawn | |
respawn limit 10 5 | |
pre-start script | |
$DAEMON -t | |
if [ $? -ne 0 ] | |
then exit $? | |
fi | |
end script | |
exec $DAEMON |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Detailed instruction how to compile and install Nginx could be found here: http://blog.thehippo.de/2012/12/server/install-nginx-from-source-on-ubuntu/