mirror of
https://github.com/cupcakearmy/livestream.git
synced 2024-12-21 07:36:33 +00:00
nginx config
This commit is contained in:
parent
2cb57f8700
commit
4b76d40354
64
nginx.conf
Normal file
64
nginx.conf
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user