Skip to content

Instantly share code, notes, and snippets.

@ricardokrieg
Created January 24, 2012 17:51
Show Gist options
  • Save ricardokrieg/1671504 to your computer and use it in GitHub Desktop.
Save ricardokrieg/1671504 to your computer and use it in GitHub Desktop.
Nginx example site
upstream unicorn_app {
server unix:/home/ubuntu/www/app.com.br/current/tmp/.sock
fail_timeout=0;
}
server {
listen 81;
server_name .app.com.br;
root /home/ubuntu/www/app.com.br/current/public;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
if (!-f $request_filename) {
proxy_pass http://unicorn_app;
break;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment