load_module modules/ngx_rtmp_module.so; worker_processes auto; events { worker_connections 1024; } rtmp { server { listen 1935; chunk_size 4000; application live { live on; hls on; hls_path /var/lib/streaming/hls/; hls_fragment 3s; hls_playlist_length 60s; deny play all; } } } http { sendfile off; tcp_nopush on; aio on; directio 512; default_type application/octet-stream; server { listen 8080; location / { add_header 'Cache-Control' 'no-cache'; add_header 'Access-Control-Allow-Origin' '*' always; add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range'; add_header 'Access-Control-Allow-Headers' 'Range'; if ($request_method = 'OPTIONS') { add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Headers' 'Range'; add_header 'Access-Control-Max-Age' 1728000; add_header 'Content-Type' 'text/plain charset=UTF-8'; add_header 'Content-Length' 0; return 204; } types { application/dash+xml mpd; application/vnd.apple.mpegurl m3u8; video/mp2t ts; } root /var/lib/streaming/; } } }