Skip to content

Instantly share code, notes, and snippets.

@andfoy
Created October 4, 2016 19:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andfoy/bbdc5ce7e56b1fe7f2d9852a13a8a028 to your computer and use it in GitHub Desktop.
Save andfoy/bbdc5ce7e56b1fe7f2d9852a13a8a028 to your computer and use it in GitHub Desktop.
# 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