forked from tesYolan/AvatarOrchestrator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
66 lines (58 loc) · 1.47 KB
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
worker_processes 1;
events {
worker_connections 1024;
}
# Compile nginx with this option --add-module=../nginx-rtmp-module
rtmp {
server {
listen 5442;
chunk_size 4000;
application live {
live on;
record all;
record_path /video_recordings;
record_unique on;
hls on;
# Be sure to create his folder. Otherwise, it wouldn't work.
hls_path /HLS/live/;
hls_fragment 3s;
hls_playlist_length 60;
}
}
}
http {
include mime.types;
default_type application/octet-stream;
directio 512;
sendfile off;
server {
listen 5443 ssl;
server_name localhost;
# Be sure this points to a valid location in your system.
ssl_certificate /home/node/app/mediasoup-demo/server/certs/mediasoup-demo.localhost.cert.pem;
ssl_certificate_key /home/node/app/mediasoup-demo/server/certs/mediasoup-demo.localhost.key.pem;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location /live {
add_header 'Cache-Control' 'no-cache';
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Max-Age' 1728000;
types{
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
alias /HLS/live;
}
location /dash {
# Be sure this points to a valid location.
alias /stream/vod;
add_header Cache-Control no-cache;
}
location /stats {
# Compile nginx with --with-http_stub_status_module option.
stub_status;
}
}
}