Files
datarhei-restreamer/conf/nginx.conf
Jan Stabenow 43cff2fabe ADD v0.1.0
known bug: nginx init-check does not work
2017-08-23 13:49:32 +02:00

62 lines
1.5 KiB
Nginx Configuration File

error_log stderr;
worker_processes 1;
events {
worker_connections 1024;
}
rtmp {
server {
listen 1935;
chunk_size 4000;
application live {
live on;
idle_streams off;
}
application hls {
live on;
hls on;
hls_type live;
hls_playlist_length 60s;
hls_fragment 2s;
hls_sync 1ms;
hls_path /tmp/hls;
idle_streams off;
}
}
}
http {
sendfile off;
tcp_nopush on;
server {
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 *;
}
location @node {
add_header Access-Control-Allow-Origin *;
proxy_pass http://127.0.0.1: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 = /ping {
add_header Content-Type text/plain;
return 200 "pong";
access_log off;
}
}
}
daemon off;