server { listen 8799; server_name 0.0.0.0; location / { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; root html; index index.html index.htm; } location ~ (favicon.ico) { } location = /favicon.ico { return 204; access_log off; log_not_found off; } location /mediaserver { if ($request_filename ~* ^.*?.(wav|mp4|png|jpeg|jpg)$){ add_header Content-Disposition attachment; } alias /var/ftp/public_root/; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } }