Skip to content

Instantly share code, notes, and snippets.

@diago
Created November 16, 2011 19:55
Show Gist options
  • Save diago/1371149 to your computer and use it in GitHub Desktop.
Save diago/1371149 to your computer and use it in GitHub Desktop.
upstream portal {
server 127.0.0.1:3000;
server 127.0.0.1:3001;
}
server {
listen 80 default_server;
server_name _;
root /opt/portal/public;
location / {
try_files $request_filename @portal;
}
location @portal {
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forward_for;
# proxy_set_header Host $http_host;
# proxy_redirect false;
proxy_pass http://portal;
}
location ~* \.(jpg|png|gif)$ {
expires 30d;
}
location ~* \.(js|css) {
expires 7d;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment