Created
January 15, 2015 12:12
-
-
Save intinig/fc195a149f70a36af81c 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/app0.sock; | |
| server unix:/var/run/app1.sock; | |
| } | |
| server { | |
| listen 80; | |
| server_name $nginx_rgts_host *.$nginx_rgts_host; | |
| root /app/public; | |
| try_files $uri/index.html $uri @rgts; | |
| location @rgts { | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| 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; | |
| } | |
| client_max_body_size 4G; | |
| keepalive_timeout 10; | |
| error_page 500 502 503 504 /50x.html; | |
| location = /50x.html { | |
| root /usr/share/nginx/html; | |
| } | |
| location ~ ^/(assets)/ { | |
| expires max; | |
| add_header Cache-Control public; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment