location /stat { rtmp_stat all; rtmp_stat_stylesheet stat.xsl; } location /stat.xsl { root /usr/share/nginx/html; default_type application/xml; } location /control { rtmp_control all; } # origin controlled ttls location ~* /*hls/.*\.ts$ { types { video/mp2t ts; } root /var/lib/nginx; add_header Cache-Control "max-age=900"; expires 900s; add_header Access-Control-Allow-Origin *; } location ~* /*hls/.*\.m3u8$ { types { application/vnd.apple.mpegurl m3u8; } root /var/lib/nginx; add_header Cache-Control "max-age=3"; expires 3s; add_header Access-Control-Allow-Origin *; }