62 lines
1.5 KiB
Plaintext
62 lines
1.5 KiB
Plaintext
|
|
upstream pc-proxy {
|
||
|
|
server pc:80;
|
||
|
|
}
|
||
|
|
|
||
|
|
upstream mobile-proxy {
|
||
|
|
server mobile:80;
|
||
|
|
}
|
||
|
|
|
||
|
|
upstream backend-api {
|
||
|
|
server backend:8089;
|
||
|
|
}
|
||
|
|
server {
|
||
|
|
listen 80;
|
||
|
|
server_name localhost;
|
||
|
|
absolute_redirect off;
|
||
|
|
|
||
|
|
charset utf-8;
|
||
|
|
|
||
|
|
gzip on;
|
||
|
|
gzip_min_length 1k;
|
||
|
|
gzip_comp_level 5;
|
||
|
|
gzip_types application/javascript application/x-javascript text/javascript text/css image/jpeg image/gif image/png;
|
||
|
|
gzip_disable "MSIE [1-6]\.";
|
||
|
|
gzip_vary on;
|
||
|
|
|
||
|
|
location /web/ {
|
||
|
|
proxy_pass http://pc-proxy/web/;
|
||
|
|
}
|
||
|
|
|
||
|
|
location /app/ {
|
||
|
|
proxy_pass http://mobile-proxy/app/;
|
||
|
|
}
|
||
|
|
|
||
|
|
location /api/ {
|
||
|
|
add_header Access-Control-Allow-Credentials true;
|
||
|
|
add_header Access-Control-Allow-Origin $http_origin;
|
||
|
|
add_header Access-Control-Allow-Headers *;
|
||
|
|
add_header Access-Control-Allow-Methods *;
|
||
|
|
proxy_http_version 1.1;
|
||
|
|
proxy_read_timeout 7200;
|
||
|
|
client_max_body_size 200m;
|
||
|
|
proxy_set_header Upgrade $http_upgrade;
|
||
|
|
proxy_set_header Connection "upgrade";
|
||
|
|
proxy_set_header Host $host;
|
||
|
|
proxy_set_header X-Real-IP $remote_addr;
|
||
|
|
proxy_set_header X-Forwarded-HOST $host;
|
||
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||
|
|
proxy_buffering off;
|
||
|
|
|
||
|
|
proxy_pass http://backend-api/;
|
||
|
|
}
|
||
|
|
|
||
|
|
location /files/ {
|
||
|
|
alias /data/files/;
|
||
|
|
}
|
||
|
|
|
||
|
|
location /manager/sysFile/download/ {
|
||
|
|
alias /data/files/;
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|