Skip to content

Instantly share code, notes, and snippets.

@eduardodeoh
Created November 2, 2012 21:05
Show Gist options
  • Save eduardodeoh/4004292 to your computer and use it in GitHub Desktop.
Save eduardodeoh/4004292 to your computer and use it in GitHub Desktop.
Todolist - My Rails App conf for nginx
server {
listen 80 default deferred;
server_name app1.eduardodeoh.com.br;
root /var/www/rails_apps/todolist/current/public;
charset utf-8;
location ^~ /assets/ {
gzip_static on;
expires max;
add_header Cache-Control public;
}
try_files $uri/index.html $uri @unicorn-todolist;
location @unicorn-todolist {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://unicorn-todolist;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 1G;
keepalive_timeout 10;
}
~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment