# an example config for running nginx with dash_server.py as the backend # define connection to dash_server.py upstream dash_server_py { server [::1]:8000; } server { # network config listen [::]:80 default_server; # tweak to your site and uncomment for TLS #listen [::]:443 ssl; #ssl_certificate ; #ssl_certificate_key ; #ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH'; #ssl_dhparam ; # optional, verify the client certificate for authenticated uploading #ssl_verify_client optional; #ssl_client_certificate ; #if ($request_method ~ ^(POST|PUT)$) { # set $reject "1"; #} #if ($ssl_client_verify = "SUCCESS") { # set $reject "0"; #} #if ($reject = "1") { # return 403; #} server_name dash; root ; index index.html; # define parameters for communicating with dash_server.py # enable chunked transfers proxy_http_version 1.1; proxy_buffering off; proxy_request_buffering off; # finish the upload even if the client does not bother waiting for our # response proxy_ignore_client_abort on; add_header Access-Control-Allow-Origin *; location / { try_files $uri $uri/ =404; } location /live/ { limit_except GET { proxy_pass http://dash_server_py; } try_files $uri @dash_server; } location @dash_server { proxy_pass http://dash_server_py; } }