Files
senmesh-zc/deploy/nginx/web-iw.conf
KodouWZF 47273ae3fd init: 信创文件安全传输系统内外网本地 Docker 部署
包含 s-file 后端、React 前端、MeshSafe 安全检测对接,以及内外网两套
compose/nginx/配置(仅前端 28180/28280 对外发布,其余端口不暴露)。

说明:deploy/config/application-iw.yml 与 application-ow.yml 按维护者
明确要求原样入库,其中含本机 Docker 用的库口令、RabbitMQ 口令与 JWT
密钥;上生产前需替换。
2026-11-02 10:59:03 +08:00

38 lines
1.2 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
server {
listen 80;
server_name _;
charset utf-8;
root /usr/share/nginx/inside;
index index.html;
# 与后端 multipart 上限(500MB)保持一致
client_max_body_size 500m;
# /api/xxx -> 后端 /xxx(去掉 /api 前缀,与 vite dev 代理行为一致)
location /api/ {
proxy_pass http://app-iw:8080/;
proxy_http_version 1.1;
# 必须保留端口($http_host):后端 getRootDomain 对无端口的 localhost/IP 会抛
# IllegalStateException 导致 /login 成功回调 500(带端口时按非法域名返回 null,Cookie 不带 domain)
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 600s;
proxy_send_timeout 600s;
proxy_request_buffering off;
}
# SPA:hash 路由,静态资源找不到时回落 index.html
location / {
try_files $uri $uri/ /index.html;
}
location ~* \.(js|mjs|css|woff2?|ttf|png|jpe?g|gif|svg|ico)$ {
expires 7d;
access_log off;
}
}