-
Notifications
You must be signed in to change notification settings - Fork 2
/
default.conf
37 lines (33 loc) · 1023 Bytes
/
default.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
server {
listen 80;
server_name localhost; # 修改为docker服务宿主机的ip
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html =404;
}
location ^~/mypan {
client_max_body_size 20m;
alias /usr/share/nginx/html/easypan;
index index.html index.htm;
try_files $uri $uri/ /easypan/index.html;
}
location /mypan-api {
client_max_body_size 20m;
default_type application/json;
#internal;
keepalive_timeout 30s;
keepalive_requests 1000;
#支持keep-alive
proxy_http_version 1.1;
rewrite /mypan-api(/.*) $1 break;
proxy_pass_request_headers on;
proxy_next_upstream error timeout;
# 同一网络内部使用服务名访问
proxy_pass http://MyPanService:8082;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}