Created
January 24, 2015 15:31
-
-
Save icsaas/0e006723e89938320e5c 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 trade {server 127.0.0.1:5000;} | |
server { | |
listen 80; ## listen for ipv4; this line is default and implied | |
server_name localhost _; | |
root /pathtoroot; | |
index index.html index.htm; | |
proxy_connect_timeout 900; | |
proxy_read_timeout 900; | |
proxy_send_timeout 900; | |
proxy_buffer_size 64k; | |
proxy_buffers 4 32k; | |
proxy_busy_buffers_size 64k; | |
proxy_temp_file_write_size 64k; | |
location /status { | |
proxy_pass http://trade; | |
proxy_redirect off; | |
proxy_http_version 1.1; | |
proxy_set_header upgrade $http_upgrade; | |
proxy_set_header Conntection "upgrade"; | |
} | |
location / { | |
try_files $uri @test; | |
} | |
location @test { | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $host; | |
proxy_redirect off; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Scheme $scheme; | |
proxy_pass http://trade; | |
} | |
location ~^/static/ { | |
root /pathtostatic; | |
expires off; | |
access_log off; | |
} | |
location ~^/media/ { | |
root /pathtomedia; | |
expires 24h; | |
access_log off; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment