83 lines
1.7 KiB
Nginx Configuration File
83 lines
1.7 KiB
Nginx Configuration File
|
daemon off;
|
||
|
error_log /dev/stdout info;
|
||
|
|
||
|
worker_processes 1;
|
||
|
|
||
|
events {
|
||
|
worker_connections 1024;
|
||
|
}
|
||
|
|
||
|
http {
|
||
|
include 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 logs/access.log main;
|
||
|
|
||
|
sendfile on;
|
||
|
#tcp_nopush on;
|
||
|
|
||
|
keepalive_timeout 65;
|
||
|
|
||
|
server {
|
||
|
listen 80;
|
||
|
server_name localhost;
|
||
|
|
||
|
location / {
|
||
|
root html;
|
||
|
index index.html index.htm;
|
||
|
}
|
||
|
|
||
|
location /dash {
|
||
|
types {
|
||
|
application/dash+xml mpd;
|
||
|
video/mp4 m4v;
|
||
|
audio/mp4 m4a;
|
||
|
}
|
||
|
add_header Access-Control-Allow-Origin *;
|
||
|
add_header Cache-Control no-cache;
|
||
|
root /;
|
||
|
}
|
||
|
|
||
|
location /hls {
|
||
|
types {
|
||
|
application/vnd.apple.mpegurl m3u8;
|
||
|
video/mp2t ts;
|
||
|
}
|
||
|
add_header Access-Control-Allow-Origin *;
|
||
|
add_header Cache-Control no-cache;
|
||
|
root /;
|
||
|
}
|
||
|
|
||
|
error_page 500 502 503 504 /50x.html;
|
||
|
location = /50x.html {
|
||
|
root html;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
rtmp {
|
||
|
access_log /dev/stdout;
|
||
|
server {
|
||
|
listen 1935;
|
||
|
chunk_size 4096;
|
||
|
|
||
|
application live {
|
||
|
live on;
|
||
|
|
||
|
dash on;
|
||
|
dash_path /dash;
|
||
|
dash_fragment 2s;
|
||
|
dash_playlist_length 30s;
|
||
|
|
||
|
hls on;
|
||
|
hls_path /hls;
|
||
|
hls_fragment 2s;
|
||
|
hls_playlist_length 30s;
|
||
|
}
|
||
|
}
|
||
|
}
|