Created
November 30, 2010 07:50
-
-
Save ammmir/721313 to your computer and use it in GitHub Desktop.
nginx and node deployment config
This file contains hidden or 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
upstream myapp_new { | |
server unix:/tmp/myapp-new.sock; | |
} | |
upstream myapp_old { | |
server unix:/tmp/myapp-old.sock; | |
} | |
server { | |
location / { | |
error_page 502 503 504 = @failover; | |
proxy_next_upstream error timeout http_500 http_502 http_503 http_504 http_404; | |
proxy_intercept_errors on; | |
proxy_pass http://myapp_new; | |
break; | |
} | |
location @failover { | |
proxy_next_upstream error timeout http_500 http_502 http_503 http_504 http_404; | |
proxy_intercept_errors on; | |
proxy_pass http://myapp_old; | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment