daemon off; error_log /dev/stdout info; events { worker_connections 1024; } rtmp { server { listen 1935; chunk_size 4000; application stream { live on; record off; notify_method get; on_publish http://api:9090/authorize; } application hls { live on; hls on; hls_fragment 2; hls_fragment_slicing aligned; hls_playlist_length 60; hls_path /opt/data/hls; hls_nested on; } } } http { root /www/static; sendfile off; tcp_nopush on; server_tokens off; access_log /dev/stdout combined; server { listen 80; location / { alias /opt/data/hls/; types { application/vnd.apple.mpegurl m3u8; video/mp2t ts; } add_header Cache-Control no-cache; add_header Access-Control-Allow-Origin *; } } server { listen 9093; location /stat { rtmp_stat all; rtmp_stat_stylesheet stat.xsl; } location /stat.xsl { root /www/static; } location /crossdomain.xml { default_type text/xml; expires 24h; } } }