Created
October 4, 2016 19:34
-
-
Save andfoy/bbdc5ce7e56b1fe7f2d9852a13a8a028 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
# Enumerate all the Tornado servers here | |
upstream frontends { | |
server 127.0.0.1:8000; | |
} | |
server { | |
listen 80; | |
server_name webhook.margffoy-tuay.com; | |
# Allow file uploads | |
client_max_body_size 50M; | |
location ^~ /static/ { | |
root /var/www; | |
if ($query_string) { | |
expires max; | |
} | |
} | |
location = /favicon.ico { | |
rewrite (.*) /static/favicon.ico; | |
} | |
location = /robots.txt { | |
rewrite (.*) /static/robots.txt; | |
} | |
location / { | |
proxy_pass_header Server; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Scheme $scheme; | |
proxy_pass http://frontends; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment