Cannot playback live when using nginx in front of the docker nginx
Using docker image (deamos/openstreamingplatform:latest
, sha256 0b5013a892c7
)
I've found #102 (closed) and adapted my config a bit (see below) but I can't get playback to work.
Urls in /live-rec/...
(or even the adaptive ones) ends up in 404 Not Found.
Is there a special trick to do to get it to work ?
server {
listen x:80;
listen [x]:80;
server_name x.sh;
access_log /var/log/nginx/x.sh.access.log;
error_log /var/log/nginx/x.sh.error.log;
location / { return 301 https://$host$request_uri; }
}
server {
listen x ssl http2;
listen [x]:443 ssl http2;
server_name x.sh;
ssl_certificate /srv/letsencrypt/certs/x.sh/fullchain.pem;
ssl_certificate_key /srv/letsencrypt/certs/x.sh/privkey.pem;
# Security hardening (as of 11/02/2018)
ssl_protocols TLSv1.2; # TLSv1.3, TLSv1.2 if nginx >= 1.13.0
ssl_prefer_server_ciphers on;
ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
# ssl_ecdh_curve secp384r1; # Requires nginx >= 1.1.0, not compatible with import-videos script
ssl_session_timeout 10m;
ssl_session_cache shared:SSL:10m;
ssl_session_tickets off; # Requires nginx >= 1.5.9
ssl_stapling on; # Requires nginx >= 1.3.7
ssl_stapling_verify on; # Requires nginx => 1.3.7
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload";
client_max_body_size 8G;
access_log /var/log/nginx/x.sh.access.log;
error_log /var/log/nginx/x.sh.error.log;
location / {
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://10.0.0.138;
}
location /socket.io {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header X-NginX-Proxy true;
# prevents 502 bad gateway error
proxy_buffers 8 32k;
proxy_buffer_size 64k;
proxy_redirect off;
# enables WS support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://10.0.0.138/socket.io;
}
}