nginx config

This commit is contained in:
nicco 2018-06-27 20:43:14 +02:00
parent 2cb57f8700
commit 4b76d40354
1 changed files with 64 additions and 0 deletions

64
nginx.conf Normal file
View File

@ -0,0 +1,64 @@
load_module modules/ngx_rtmp_module.so;
rtmp_auto_push on;
# rtmp_auto_push_reconnect 1s;
# rtmp_socket_dir /var/sock;
user nginx;
error_log stderr;
pid /var/run/nginx.pid;
worker_processes 1;
events {}
rtmp {
server {
listen 1935;
application live {
live on;
record off;
dash on;
dash_path /stream/dash;
hls on;
hls_path /stream/hls;
deny play all;
}
}
}
# HTTP can be used for accessing RTMP stats
http {
server {
listen 80;
location / {
root /srv;
}
location /stat {
rtmp_stat all;
rtmp_stat_stylesheet stat.xsl;
}
location /stat.xsl {
root /path/to/stat.xsl/;
}
location /hls {
types {
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
root /stream;
add_header Cache-Control no-cache;
}
location /dash {
root /stream;
add_header Cache-Control no-cache;
}
}
}