Created
April 27, 2014 18:08
-
-
Save xdougx/11351773 to your computer and use it in GitHub Desktop.
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
upstream unicorn { | |
server unix:/tmp/unicorn.foo.sock fail_timeout=0; | |
} | |
server { | |
listen 80 default deferred; | |
listen 443 ssl default; | |
ssl_certificate /etc/ssl/certs/foo.crt; | |
ssl_certificate_key /etc/ssl/private/foo.key; | |
server_name foo; | |
root /var/apps/foo/current/public; | |
try_files $uri/system/maintenance.html $uri/index.html $uri @unicorn; | |
location @unicorn { | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; | |
proxy_pass http://unicorn; | |
} | |
error_page 502 503 /maintenance.html; | |
error_page 500 504 /500.html; | |
keepalive_timeout 5; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment