worker_processes auto; error_log /dev/stdout info; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /dev/stdout main; sendfile on; keepalive_timeout 65; gzip on; ignore_invalid_headers off; upstream node-backend { server localhost:8080 max_fails=0; } server { listen 8000; server_name localhost; sendfile off; location ~ live\.m3u8 { add_header Cache-Control "max-age=60"; root /dev/shm/hls; } location ~ index\.m3u8 { add_header Cache-Control "no-cache"; root /dev/shm/hls; } location ~ \.ts { add_header Cache-Control "max-age=600"; root /dev/shm/hls; } location /nginx_status { stub_status on; access_log off; allow 127.0.0.1; deny all; } location / { add_header Cache-Control "no-cache"; proxy_pass http://node-backend/; } } }