Repository navigation
Expand file tree
/
Copy pathnginx.conf
More file actions
109 lines (82 loc) · 2.46 KB
/
Copy pathnginx.conf
File metadata and controls
109 lines (82 loc) · 2.46 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
user www-data;
worker_processes 1;
error_log /usr/local/nginx/logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
pid /usr/local/nginx/logs/nginx.pid;
events {
use epoll;
worker_connections 1024;
}
http {
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" $request_time';
access_log /usr/local/nginx/logs/access.log main;
tcp_nodelay on;
client_max_body_size 100M;
types_hash_max_size 2048;
include /usr/local/nginx/conf/mime.types;
default_type application/octet-stream;
sendfile on;
tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 80 default_server;
server_name _;
root /data/hdd/kkb/www;
#charset koi8-r;
#access_log logs/host.access.log main;
location ~ ^/live/.+\.ts$ {
expires max;
# root html;
# index index.html index.htm;
}
location ~ ^/live/[^/]+/index\.m3u8$ {
# Don't cache live HLS manifests
expires -1d;
}
location / {
proxy_pass http://218.150.183.59:8000/;
}
}
}
rtmp {
server {
listen 1935;
application encode {
live on;
push rtmp://218.150.183.59:1935/hls;
on_publish http://218.150.183.59:8000/start_stream;
on_publish_done http://218.150.183.59:8000/stop_stream;
}
application test {
live on;
}
application key {
live on;
on_publish http://218.150.183.59:8000/onpublish;
# on_publish_done http://218.150.183.59:8000/stop_stream;
# on_publish http://218.150.183.59:8000/tt;
# allow publish 218.150.183.59;
# deny publish all;
# allow play 218.150.183.59;
# deny play all;
}
application hls {
live on;
allow publish 218.150.183.59;
deny publish all;
deny play all;
hls on;
hls_path /data/hdd/kkb/www/live;
hls_nested on;
hls_fragment_naming system;
hls_playlist_length 2s;
hls_fragment 1s;
# hls_datetime system;
}
}
}