--- /dev/null
+upstream vps76.heliohost.us {
+ keepalive 100;
+ server 127.0.0.1:8000;
+ #server unix:/tmp/sanic.sock;
+}
+
+server {
+ server_name vps76.heliohost.us;
+ # listen 443 ssl http2 default_server;
+ # listen [::]:443 ssl http2 default_server;
+ # Serve static files if found, otherwise proxy to Sanic
+ location / {
+ root /var/www;
+ try_files $uri @sanic;
+ }
+ location @sanic {
+ proxy_pass http://$server_name;
+ # Allow fast streaming HTTP/1.1 pipes (keep-alive, unbuffered)
+ proxy_http_version 1.1;
+ proxy_request_buffering off;
+ proxy_buffering off;
+ # Proxy forwarding (password configured in app.config.FORWARDED_SECRET)
+ # proxy_set_header forwarded "$proxy_forwarded;secret=\"fdXyFNs4U7aabARo4VsUrPAcrWPHoiuz\"";
+ # Allow websockets and keep-alive (avoid connection: close)
+ proxy_set_header connection "upgrade";
+ proxy_set_header upgrade $http_upgrade;
+ }
+}
+