user www-data; worker_processes 4; pid /run/nginx.pid; events { worker_connections 1024; } http { ## # Basic Settings ## include mime.types; default_type application/octet-stream; ## # SSL Settings ## ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE ssl_prefer_server_ciphers on; ## # Logging Settings ## access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; ## # Virtual Host Configs ## server { listen 80; server_name xxx; # creates the http-location for our full-resolution (desktop) HLS stream # http://my-ip/live/my-stream-key/index.m3u8 location /live { types { application/vnd.apple.mpegurl m3u8; } alias /HLS/live; add_header Cache-Control no-cache; } } } # RTMP Server rtmp { server { listen 1935; allow play all; application live { allow play all; live on; record all; record_path /video_recordings; record_unique on; hls on; hls_nested on; hls_path /HLS/live; hls_fragment 10s; } application vod { play /video_recordings; } } }