blob: 8c1f13e7d800ade7ceca648167202cc5e6a4b87c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# 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 <path to TLS cert>;
#ssl_certificate_key <path to TLS key>;
#ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
#ssl_dhparam <path to DH params, optional>;
# optional, verify the client certificate for authenticated uploading
#ssl_verify_client optional;
#ssl_client_certificate <path to CA for client certs>;
#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 <path to site 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;
}
}
|