Skip to content

Instantly share code, notes, and snippets.

@lloydk
Created November 4, 2010 12:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lloydk/662380 to your computer and use it in GitHub Desktop.
Save lloydk/662380 to your computer and use it in GitHub Desktop.
nginx upstart configuration
sudo update-rc.d -f nginx remove
sudo rm /etc/init.d/nginx
# upstart job commands
sudo start nginx
sudo stop nginx
sudo restart nginx
sudo reload nginx
# list all jobs
sudo initctl list
# /etc/init/nginx.conf
description "nginx http daemon"
start on runlevel [2]
stop on runlevel [016]
exec /opt/nginx/sbin/nginx -c /opt/nginx/conf/nginx.conf -g "daemon off;"
respawn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment