Created
March 12, 2015 11:48
-
-
Save intinig/4c7a5bbe81a3c1f2e0e3 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 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; | |
| } | |
| 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