Skip to content

Instantly share code, notes, and snippets.

@ehq
Created September 10, 2010 05:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ehq/573129 to your computer and use it in GitHub Desktop.
Save ehq/573129 to your computer and use it in GitHub Desktop.
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