Skip to content

Instantly share code, notes, and snippets.

@TheHippo
Created December 12, 2012 18:22
Show Gist options
  • Save TheHippo/4270241 to your computer and use it in GitHub Desktop.
Save TheHippo/4270241 to your computer and use it in GitHub Desktop.
Upstart config for running Nginx.
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
@TheHippo
Copy link
Author

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment