Skip to content

Instantly share code, notes, and snippets.

@kunishi
Last active August 29, 2015 14:07
Show Gist options
  • Save kunishi/9f93505bae105a3eafa5 to your computer and use it in GitHub Desktop.
Save kunishi/9f93505bae105a3eafa5 to your computer and use it in GitHub Desktop.
upstream app {
server unix:/usr/local/nginx/html/apps/service/shared/tmp/sockets/unicorn.app.sock fail_timeout=0;
}
server {
listen 80;
server_name service.dbsj.org;
client_max_body_size 4G;
root /usr/local/nginx/html/apps/service/current/public;
try_files $uri/index.html $uri @app;
location @app {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://app;
}
error_page 500 502 503 504 /500.html;
location = /500.html {
root /usr/local/nginx/html/apps/service/current/public;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment