forked from 1424234500/help_note_20190602
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
118 lines (93 loc) · 3.01 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
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
110
111
112
113
114
115
116
117
118
#user nobody;
worker_processes 1;
error_log logs/error.log;
error_log logs/error.notice.log notice;
error_log logs/error.info.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
rtmp { # 配置RTMP模块
server { # 服务器
listen 1935; # 监听端口, 默认为1935
chunk_size 4000; # 数据块大小 4000
application hls {
live on;
hls on;
hls_path E:/nginx-rtmp/hls; #文件存放地址,/tmp/hls
}
application myapp { # 应用名称, 可理解为直播房间的名称
live on; # 直播 [on]开启
record_max_frames 0;
}
}
}
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;
#######
## http setting
#######
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 1800; #这个参数表示http连接超时时间,默认是65s。要是上传文件比较大,在规定时间内没有上传完成,就会自动断开连接!所以适当调大这个时间。
fastcgi_connect_timeout 6000;
fastcgi_send_timeout 6000;
fastcgi_read_timeout 6000;
fastcgi_buffer_size 256k;
fastcgi_buffers 8 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
##
client_header_timeout 120s; #调大点
client_body_timeout 120s; #调大点
client_max_body_size 1000m; #主要是这个参数,限制了上传文件大大小
client_body_buffer_size 256k;
#gzip on;
#Tomcat
upstream base {
server 127.0.0.1:8085 weight=1;
}
#RaspBerry python tornado
upstream python {
server 127.0.0.1:8086 weight=1;
}
#RaspBerry python socket
upstream socket {
server 127.0.0.1:8087 weight=1;
}
server {
listen 8088;
server_name localhost;
# rtmp hls http直播
location /hls {
types {
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
root E:/nginx-rtmp;
add_header Cache-Control no-cache;
}
location /AngularApp{
root E:/workspace_my;
}
location /app {
root E:/help_note/python;
autoindex on;
}
location /do {
proxy_pass http://python;
}
location /BaseSSM {
proxy_pass http://base;
}
location / {
root E:/help_note;
}
}
}