Skip to content

Instantly share code, notes, and snippets.

@simaob
Created June 13, 2015 13:28
Show Gist options
  • Save simaob/4e8a710fb8d40084c71f to your computer and use it in GitHub Desktop.
Save simaob/4e8a710fb8d40084c71f to your computer and use it in GitHub Desktop.
gtportugal nginx conf
upstream gtportugal {
# Path to Unicorn SOCK file, as defined previously
server unix:/tmp/unicorn.gtportugal.sock fail_timeout=0;
}
server {
listen 80;
#server_name gtportugal.simaobelchior.net;
server_name localhost;
# Application root, as defined previously
root /home/simaob/gtportugal/public;
location ^~ /assets/ {
gzip_static on;
expires max;
add_header Cache-Control public;
# access_log /dev/null;
}
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://gtportugal;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 4G;
keepalive_timeout 10;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment