-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathnginx.conf
44 lines (42 loc) · 1.23 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
gzip on;
gzip_min_length 100k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 6; #压缩等级,号量不多并发小的客户可以使用6,号量多并发高的客户使用1
gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/x-httpd-php application/javascript;
gzip_disable "MSIE [1-6]\.";
upstream api{
server wecomscrm:8090 weight=1 fail_timeout=2s max_fails=2;
}
# lockscrm 第三方SCRM系统 后端地址 8090 :后端服务地址 具体端口号需要自行修改
upstream lock{
server lockscrm:8090 weight=1 fail_timeout=2s max_fails=2;
}
server {
listen 80;
server_name 127.0.0.1;
location / {
root /app/mobile/;
index index.html index.htm;
}
location ~/WW_verify* {
root /app/mobile/verfile/;
}
location /api/ {
proxy_pass http://api/;
proxy_http_version 1.1;
index index.html index.htm;
}
location /lock/ {
proxy_pass http://lock/;
proxy_http_version 1.1;
}
location /profile {
proxy_pass http://api;
proxy_http_version 1.1;
proxy_connect_timeout 1;
proxy_send_timeout 30;
proxy_read_timeout 60;
proxy_buffering off;
}
}