提交
This commit is contained in:
1 parent
8aab018558
commit
1b2896c877
70 files changed
+7753
-3306
No files matched your search
+6
-2
@@ -13,6 +13,7 @@
|
||||
|------|------|
|
||||
| 入口 | `https://www.chengyantek.cn`(兼容 `http://101.35.245.122:10001`) |
|
||||
| Nginx 静态 | `/root/zkxw/web-admin/dist` |
|
||||
| OA H5 静态 | `/root/zkxw/static/oa-h5`(路径前缀 `/oa-h5/`) |
|
||||
| 后端 | `127.0.0.1:10002`(仅本机) |
|
||||
| 中间件 | 与本机 `backend/.env` 相同(`47.99.164.66`) |
|
||||
| MinIO | 同域 `/minio/zkxw` → `47.99.164.66:20004/zkxw` |
|
||||
@@ -21,12 +22,14 @@
|
||||
流量路径:
|
||||
|
||||
```text
|
||||
浏览器 → http://101.35.245.122:10001
|
||||
浏览器 → https://www.chengyantek.cn (或 http://IP:10001)
|
||||
├─ / → Nginx 静态(web-admin/dist)
|
||||
├─ /oa-h5/ → Nginx 静态(mobile-oa-h5 → /root/zkxw/static/oa-h5)
|
||||
├─ /api/* → 127.0.0.1:10002(本机后端)
|
||||
└─ MinIO 附件 → 浏览器直连 47.99.164.66:20004/zkxw
|
||||
└─ /minio/zkxw/ → 47.99.164.66:20004/zkxw/
|
||||
```
|
||||
|
||||
`mobile-h5` 配置示例:`OA_H5_ORIGIN = 'https://www.chengyantek.cn/oa-h5'`(微信 web-view 业务域名须含 `www.chengyantek.cn`)。
|
||||
云安全组 / 防火墙仅放行 **TCP 10001**;后端绑定 `127.0.0.1`,不对公网暴露 10002。
|
||||
|
||||
---
|
||||
@@ -127,6 +130,7 @@ Nginx 关键配置摘要:
|
||||
- `https://www.chengyantek.cn`(443 SSL)+ `http` 80/apex → 301 到 https://www
|
||||
- 兼容 `http://IP:10001`
|
||||
- `root /root/zkxw/web-admin/dist`;`/api`、`/health` → `127.0.0.1:10002`
|
||||
- `/oa-h5/` → `/root/zkxw/static/oa-h5`(`mobile-oa-h5`,Vite `base=/oa-h5/`)
|
||||
- `/minio/zkxw/` → `47.99.164.66:20004/zkxw/`(HTTPS 同域,避免混合内容)
|
||||
- 证书:`/root/zkxw/cert/www.chengyantek.cn.{pem,key}`(来源仓库旁证书包,私钥勿提交 git;`*.pem`/`*.key` 已在 `.gitignore`)
|
||||
|
||||
|
||||
@@ -111,6 +111,16 @@ server {
|
||||
add_header Access-Control-Allow-Methods "GET, HEAD, OPTIONS" always;
|
||||
}
|
||||
|
||||
# mobile-oa-h5(Vite base=/oa-h5/;静态目录 /root/zkxw/static/oa-h5)
|
||||
# mobile-h5 配置 OA_H5_ORIGIN=https://www.chengyantek.cn/oa-h5
|
||||
location = /oa-h5 {
|
||||
return 301 /oa-h5/$is_args$args;
|
||||
}
|
||||
location ^~ /oa-h5/ {
|
||||
root /root/zkxw/static;
|
||||
try_files $uri $uri/ /oa-h5/index.html;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
@@ -180,6 +190,14 @@ server {
|
||||
add_header Access-Control-Allow-Methods "GET, HEAD, OPTIONS" always;
|
||||
}
|
||||
|
||||
location = /oa-h5 {
|
||||
return 301 /oa-h5/$is_args$args;
|
||||
}
|
||||
location ^~ /oa-h5/ {
|
||||
root /root/zkxw/static;
|
||||
try_files $uri $uri/ /oa-h5/index.html;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user