Files
vod-system/nginx/nginx.conf
Dylan De Faoite 2e6679cb89 refactor(nginx): nginx only handles rtmp connections
Not longer handles frontend & backend. Partially for ease of development and also for separation of concenrs.
2026-05-14 20:20:37 +01:00

50 lines
1000 B
Nginx Configuration File

worker_processes auto;
events {
worker_connections 1024;
}
upstream backend {
server 127.0.0.1:8080;
}
upstream frontend {
server 127.0.0.1:5173;
}
rtmp {
server {
listen 1935;
chunk_size 4096;
application live {
live on;
record off;
allow publish all;
allow play all;
hls on;
hls_path /tmp/hls;
hls_fragment 3;
hls_playlist_length 60;
}
}
}
# Serve the HLS segments over HTTP
http {
server {
listen 8088;
location /hls {
types {
application/vnd.apple.mpegurl m3u8; # proper MIME for HLS playlists
video/mp2t ts; # MPEG-TS segment MIME
}
root /tmp;
add_header Cache-Control no-cache; # prevent stale segments
add_header Access-Control-Allow-Origin *; # CORS for browser playback
}
}
}