56 lines
1.1 KiB
Nginx Configuration File
56 lines
1.1 KiB
Nginx Configuration File
|
worker_processes auto;
|
||
|
rtmp_auto_push on;
|
||
|
events {}
|
||
|
rtmp {
|
||
|
server {
|
||
|
listen 1935;
|
||
|
listen [::]:1935 ipv6only=on;
|
||
|
|
||
|
application live {
|
||
|
live on;
|
||
|
hls on;
|
||
|
hls_path /tmp/hls;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
http {
|
||
|
|
||
|
server {
|
||
|
|
||
|
autoindex on;
|
||
|
listen 80;
|
||
|
|
||
|
# Frontpage
|
||
|
location / {
|
||
|
root /usr/share/nginx/html/;
|
||
|
}
|
||
|
|
||
|
# This URL provides RTMP statistics in XML
|
||
|
location /stat {
|
||
|
rtmp_stat all;
|
||
|
|
||
|
# Use this stylesheet to view XML as web page
|
||
|
# in browser
|
||
|
rtmp_stat_stylesheet stat.xsl;
|
||
|
}
|
||
|
|
||
|
location /stat.xsl {
|
||
|
# XML stylesheet to view RTMP stats.
|
||
|
# Copy stat.xsl wherever you want
|
||
|
# and put the full directory path here
|
||
|
root /tmp;
|
||
|
}
|
||
|
|
||
|
location /hls {
|
||
|
# Serve HLS fragments
|
||
|
types {
|
||
|
application/vnd.apple.mpegurl m3u8;
|
||
|
video/mp2t ts;
|
||
|
}
|
||
|
root /tmp;
|
||
|
add_header Cache-Control no-cache;
|
||
|
}
|
||
|
}
|
||
|
}
|