Skip to content

Instantly share code, notes, and snippets.

@caok
Created March 1, 2013 08:06
Show Gist options
  • Save caok/5063176 to your computer and use it in GitHub Desktop.
Save caok/5063176 to your computer and use it in GitHub Desktop.
server {
listen 80 default;
server_name example.com;
client_max_body_size 4G;
keepalive_timeout 5;
root /u/app/fruitwood/current/public;
try_files $uri/index.html $uri.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://localhost:9000;
}
# Rails error pages
error_page 500 502 503 504 /500.html;
location = /500.html {
root /u/app/fruitwood/current/public;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment