Created
March 23, 2015 16:50
-
-
Save intinig/aab475e3562d6a5cea89 to your computer and use it in GitHub Desktop.
This file contains 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 rgts { | |
server unix:/var/run/rgts.sock max_fails=0; | |
} | |
server { | |
listen 80; | |
server_name ${NGINX_RGTS_HOST}; | |
root /var/static; | |
client_max_body_size 4G; | |
keepalive_timeout 10; | |
location / { | |
try_files $uri/index.html $uri @rgts; | |
add_header Pragma "no-cache"; | |
add_header Cache-control "no-store"; | |
} | |
location @rgts { | |
add_header Pragma "no-cache"; | |
add_header Cache-control "no-store"; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; | |
proxy_pass http://rgts; | |
} | |
location ~ ^/(assets|fonts|pdfs)/ { | |
try_files $uri @rgts; | |
expires max; | |
add_header Cache-Control public; | |
add_header Last-Modified ""; | |
add_header ETag ""; | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment