-将 proxy_connect_timeout、proxy_send_timeout 和 proxy_read_timeout 的值从120s 增加到 240s - 此修改旨在提高后端服务的响应时间,避免因超时导致的请求失败
32 lines
1.1 KiB
Plaintext
32 lines
1.1 KiB
Plaintext
server {
|
|
listen 80;
|
|
|
|
gzip on;
|
|
gzip_static on; # 需要http_gzip_static_module 模块
|
|
gzip_min_length 1k;
|
|
gzip_comp_level 4;
|
|
gzip_proxied any;
|
|
gzip_types text/plain text/xml text/css;
|
|
gzip_vary on;
|
|
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
|
|
client_max_body_size "100M"; # 檔案大小限制在100MB
|
|
|
|
root /app/www;
|
|
|
|
# 若新增后端路由前缀注意在此处添加(|新增)
|
|
location ~* ^/(code|auth|admin|monitor|actuator|gen|job|tx|act|mp|pay|jimu|aj|rpt|iep-app|iep-pms|iep-tms|iep-tap|iep-qms|iep-alm|tqm-lims|iep-oem|iep-tds|iep-wms|iep-flow|iep-dcc|iMES-jxls|nlv-wms|nlv-print|mom-xxl-job-admin|iep-int|mom-wms|mom-pms) {
|
|
proxy_pass http://mom-gateway:9999;
|
|
proxy_connect_timeout 240s;
|
|
proxy_send_timeout 240s;
|
|
proxy_read_timeout 240s;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto http;
|
|
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_set_header Host $http_host;
|
|
}
|
|
}
|