daemon off; error_log stderr error; worker_processes 1; events { worker_connections 1024; } rtmp { server { listen [::]:1935 ipv6only=off; chunk_size 4000; application live { live on; idle_streams off; on_publish http://localhost:3000/token; notify_method get; } application hls { live on; hls on; hls_type live; hls_playlist_length 60s; hls_fragment 2s; hls_sync 2ms; hls_path /tmp/hls; idle_streams off; on_publish http://localhost:3000/token; notify_method get; } } } http { sendfile off; tcp_nopush on; access_log off; gzip on; gzip_vary on; gzip_min_length 1000; gzip_types text/css application/javascript; server { listen 8080; listen [::]:8080; root /restreamer/src/webserver/public; include /usr/local/nginx/conf/mime.types; location / { try_files $uri @node; add_header Access-Control-Allow-Origin *; add_header Cache-Control no-cache; } location @node { add_header Access-Control-Allow-Origin *; add_header Cache-Control no-cache; proxy_pass http://localhost:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; } location /hls { types { application/vnd.apple.mpegurl m3u8; video/mp2t ts; } root /tmp; add_header Cache-Control no-cache; add_header Access-Control-Allow-Origin *; } location /debug { autoindex on; } location = /ping { add_header Content-Type text/plain; return 200 "pong"; } } }