server { listen 80 default_server; root /var/www; location /hls/ { add_header Access-Control-Allow-Origin * always; add_header Cache-Control "no-cache" always; types { application/vnd.apple.mpegurl m3u8; video/mp2t ts; text/vtt vtt; } } # Las listas internas de ffmpeg no se publican: el player tiene que ir por # video.m3u8, que va sostenido hasta tener subtítulo. location ~ ^/hls/[^/]+/src/index\.m3u8$ { return 404; } location = / { return 302 /player.html; } }