Created
September 10, 2010 05:00
-
-
Save ehq/573129 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 dather { | |
server unix:/srv/dather.com/shared/pids/unicorn.sock; | |
} | |
server { | |
server_name dather.com *.partners.dather.com; | |
access_log /var/log/nginx/dather.com-access.log; | |
root /srv/dather.com/current/public; | |
index index.html; | |
location / { | |
try_files /system/maintenance.html $uri $uri/ $uri.html @dather; | |
} | |
location /blog/ { | |
rewrite ^/blog(.*) http://blog.dather.com$1 permanent; | |
} | |
location @dather { | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_read_timeout 600; | |
proxy_redirect off; | |
proxy_intercept_errors on; | |
proxy_pass http://dather; | |
} | |
error_page 404 /system/404.html; | |
error_page 410 /system/410.html; | |
error_page 500 502 503 504 /system/500.html; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment