rtmp-record/nginx.conf

61 lines
1.2 KiB
Nginx Configuration File
Raw Normal View History

2020-02-03 20:50:04 +00:00
user http;
2020-02-03 20:50:04 +00:00
worker_processes auto;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
load_module /usr/lib/nginx/modules/ngx_rtmp_module.so;
2020-02-03 20:50:04 +00:00
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
keepalive_timeout 65;
server {
listen 80 default_server;
server_name localhost;
types {
application/vnd.apple.mpegurl m3u8;
}
root /data;
add_header Cache-Control no-cache;
add_header Access-Control-Allow-Origin *;
}
}
rtmp {
access_log off;
2020-02-03 20:50:04 +00:00
server {
listen 1935;
application hls {
live on;
hls on;
hls_fragment 15s;
2020-02-03 20:50:04 +00:00
hls_fragment_naming system;
hls_fragment_slicing aligned;
hls_path /data;
hls_playlist_length 24h;
hls_nested on;
}
}
}