Skip to content

Instantly share code, notes, and snippets.

@ku1ik
Forked from lucasmazza/conf.md
Created April 25, 2012 19:24
Show Gist options
  • Save ku1ik/2492523 to your computer and use it in GitHub Desktop.
Save ku1ik/2492523 to your computer and use it in GitHub Desktop.
Nginx upstart script that WORKS with Passenger.
description "nginx http daemon"
start on runlevel [2]
stop on runlevel [016]
console owner
exec /opt/nginx/sbin/nginx -c /opt/nginx/conf/nginx.conf -g "daemon off;"
respawn
@thedanielhanke
Copy link

thank you. btw, issnt "deamon off" for development/debugging purposes only? just wondering.

@IvanAnishchuk
Copy link

expect daemon doesn't work with daemon mode?

@thedanielhanke It is, but developers claim it's safe enough http://nginx.org/en/docs/faq/daemon_master_process_off.html

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