56 líneas
1.7 KiB
Plaintext
56 líneas
1.7 KiB
Plaintext
server {
|
|
listen 443 ssl http2;
|
|
listen [::]:443 ssl http2;
|
|
server_name hls.hatthieves.es;
|
|
proxy_pass_request_headers on;
|
|
client_max_body_size 2G;
|
|
# proxy_pass_request_headers on;
|
|
location /stat {
|
|
rtmp_stat all;
|
|
rtmp_stat_stylesheet stat.xsl;
|
|
auth_basic "Registry realm";
|
|
auth_basic_user_file /etc/nginx/registry.htpasswd;
|
|
}
|
|
location /stat.xsl {
|
|
alias /etc/nginx/stat.xsl;
|
|
}
|
|
location /hls {
|
|
alias /etc/nginx/hls;
|
|
types {
|
|
application/vnd.apple.mpegurl m3u8;
|
|
video/mp2t ts;
|
|
}
|
|
add_header Cache-Control no-cache;
|
|
add_header 'Access-Control-Allow-Origin' $http_origin;
|
|
add_header 'Access-Control-Allow-Credentials' 'true';
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "Upgrade";
|
|
proxy_buffering off;
|
|
proxy_http_version 1.1;
|
|
add_header Alt-Svc 'h3-25=":443"; ma=3600, h2=":443"; ma=3600';
|
|
}
|
|
location /live {
|
|
alias /etc/nginx/live;
|
|
types {
|
|
application/vnd.apple.mpegurl m3u8;
|
|
video/mp2t ts;
|
|
}
|
|
add_header Cache-Control no-cache;
|
|
add_header 'Access-Control-Allow-Origin' $http_origin;
|
|
add_header 'Access-Control-Allow-Credentials' 'true';
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "Upgrade";
|
|
proxy_buffering off;
|
|
proxy_http_version 1.1;
|
|
add_header Alt-Svc 'h3-25=":443"; ma=3600, h2=":443"; ma=3600';
|
|
}
|
|
}
|