Created
December 2, 2016 03:13
-
-
Save lucwj/efbb3bcb1868d3a0fe9ae492469e1536 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream unicorn_nykfuel-staging { | |
server unix:/tmp/unicorn.nykfuel-staging.sock | |
fail_timeout=0; | |
} | |
server { | |
listen 8081; | |
root /var/www/nykfuel-staging/current/public; | |
access_log /var/log/nginx/nykfuel-staging_access.log; | |
error_log /var/log/nginx/nykfuel-staging_error.log; | |
location ~ ^/assets/ { | |
gzip_static on; | |
expires max; | |
add_header Cache-Control public; | |
} | |
try_files $uri/index.html $uri @unicorn_nykfuel-staging; | |
location @unicorn_nykfuel-staging { | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; | |
proxy_pass http://unicorn_nykfuel-staging; | |
} | |
error_page 500 502 503 504 /500.html; | |
client_max_body_size 4G; | |
keepalive_timeout 5; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment