Docker-nginx-rtmp/nginx.conf
2016-04-29 16:17:37 +01:00

70 lines
1.5 KiB
Nginx Configuration File

worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 8080;
server_name localhost;
location /hls {
types {
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
root /tmp;
add_header Cache-Control no-cache;
}
location /on_publish {
return 201;
}
location /stat {
rtmp_stat all;
rtmp_stat_stylesheet stat.xsl;
}
location /stat.xsl {
root /opt/nginx/conf/stat.xsl;
}
location /control {
rtmp_control all;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
rtmp {
server {
listen 1935;
chunk_size 4096;
application live {
live on;
record off;
on_publish http://localhost:8080/on_publish;
hls on;
hls_path /tmp/hls;
}
application testing {
live on;
record off;
on_publish http://localhost:8080/on_publish;
}
}
}