25 lines
616 B
Plaintext
25 lines
616 B
Plaintext
proxy_cache_path /var/www/stream keys_zone=stream:10m levels=1:2 inactive=2h;
|
|
|
|
server {
|
|
ssl on;
|
|
listen 443 ssl http2;
|
|
listen [::]:443 ssl http2;
|
|
server_name stream.example.org;
|
|
ssl_certificate /etc/ssl/org.example.stream.crt;
|
|
ssl_certificate_key /etc/ssl/org.example.stream.pem;
|
|
|
|
index index.m3u8;
|
|
client_max_body_size 20M;
|
|
|
|
location / {
|
|
proxy_pass https://upstream.example.org/;
|
|
proxy_cache stream;
|
|
proxy_cache_valid 200 1d;
|
|
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
|
|
}
|
|
|
|
location ~ .*\.m3u8 {
|
|
proxy_pass https://upstream.example.org/;
|
|
}
|
|
}
|