为减少仓库噪声和重复规则,整理当前开发入口并移除已废弃资料。 - 精简根 AGENTS,补充四个应用规则与 README,统一规范入口 - 归整部署文件、SOP 原稿和参考资源,修正迁移后的脚本路径 - 取消虚拟环境、工具状态、业务导出及备份的跟踪,本机所需原件保留 - 移除停用的 graphify 配置、脚本与产物 - 删除历史业务文档、执行计划、OpenSpec 业务变更和移动 UI 原型 - 清理失效引用,历史细胞产品导入改为必须显式指定 --file 验证:git diff --cached --check、OpenSpec 严格校验、导入参数隔离检查 3/3 通过; 迁移文件完整性和现行链接已核对。未执行部署、业务数据导入或服务启停。
235 lines
7.5 KiB
Plaintext
235 lines
7.5 KiB
Plaintext
# ZKXW 测试环境(裸机)— 部署到 101.35.245.122
|
||
# 支持:
|
||
# - https://www.chengyantek.cn (443,SSL)
|
||
# - http://www.chengyantek.cn / http://chengyantek.cn → 301 到 https://www
|
||
# - http://IP:10001 (兼容旧入口,无强制跳转)
|
||
#
|
||
# 证书部署路径(服务器):
|
||
# /root/zkxw/cert/www.chengyantek.cn.pem
|
||
# /root/zkxw/cert/www.chengyantek.cn.key
|
||
#
|
||
# 用法(Ubuntu/Debian):
|
||
# cp 到 /etc/nginx/sites-available/zkxw-test-10001.conf
|
||
# ln -sfn ... /etc/nginx/sites-enabled/
|
||
# nginx -t && systemctl reload nginx
|
||
|
||
# ---------- HTTP → HTTPS(域名)----------
|
||
server {
|
||
listen 80;
|
||
listen [::]:80;
|
||
server_name www.chengyantek.cn chengyantek.cn;
|
||
return 301 https://www.chengyantek.cn$request_uri;
|
||
}
|
||
|
||
# ---------- apex HTTPS → www ----------
|
||
server {
|
||
listen 443 ssl http2;
|
||
listen [::]:443 ssl http2;
|
||
server_name chengyantek.cn;
|
||
|
||
ssl_certificate /root/zkxw/cert/www.chengyantek.cn.pem;
|
||
ssl_certificate_key /root/zkxw/cert/www.chengyantek.cn.key;
|
||
ssl_session_cache shared:SSL:10m;
|
||
ssl_session_timeout 1h;
|
||
ssl_protocols TLSv1.2 TLSv1.3;
|
||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||
ssl_prefer_server_ciphers on;
|
||
|
||
return 301 https://www.chengyantek.cn$request_uri;
|
||
}
|
||
|
||
# ---------- 主站 HTTPS ----------
|
||
server {
|
||
listen 443 ssl http2;
|
||
listen [::]:443 ssl http2;
|
||
server_name www.chengyantek.cn;
|
||
|
||
ssl_certificate /root/zkxw/cert/www.chengyantek.cn.pem;
|
||
ssl_certificate_key /root/zkxw/cert/www.chengyantek.cn.key;
|
||
ssl_session_cache shared:SSL:10m;
|
||
ssl_session_timeout 1h;
|
||
ssl_protocols TLSv1.2 TLSv1.3;
|
||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||
ssl_prefer_server_ciphers on;
|
||
|
||
root /root/zkxw/web-admin/dist;
|
||
index index.html;
|
||
client_max_body_size 500m;
|
||
client_body_timeout 3600s;
|
||
|
||
access_log /var/log/nginx/zkxw_admin_https_access.log;
|
||
error_log /var/log/nginx/zkxw_admin_https_error.log;
|
||
|
||
location = /health {
|
||
proxy_pass http://127.0.0.1:10002/health;
|
||
proxy_http_version 1.1;
|
||
proxy_set_header Host $host;
|
||
proxy_connect_timeout 10s;
|
||
proxy_read_timeout 30s;
|
||
}
|
||
|
||
location ^~ /docs {
|
||
proxy_pass http://127.0.0.1:10002;
|
||
proxy_http_version 1.1;
|
||
proxy_set_header Host $host;
|
||
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 $scheme;
|
||
}
|
||
|
||
location = /openapi.json {
|
||
proxy_pass http://127.0.0.1:10002/openapi.json;
|
||
proxy_http_version 1.1;
|
||
proxy_set_header Host $host;
|
||
}
|
||
|
||
# 附件上传:大文件要等正文传完再落存储,不能跟普通接口共用 120s
|
||
location ^~ /api/web/admin/attachment/upload {
|
||
proxy_pass http://127.0.0.1:10002;
|
||
proxy_http_version 1.1;
|
||
proxy_set_header Host $host;
|
||
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 $scheme;
|
||
proxy_request_buffering off;
|
||
proxy_connect_timeout 30s;
|
||
proxy_send_timeout 3600s;
|
||
proxy_read_timeout 3600s;
|
||
}
|
||
|
||
location ^~ /api/ {
|
||
proxy_pass http://127.0.0.1:10002;
|
||
proxy_http_version 1.1;
|
||
proxy_set_header Host $host;
|
||
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 $scheme;
|
||
proxy_connect_timeout 10s;
|
||
proxy_send_timeout 120s;
|
||
proxy_read_timeout 120s;
|
||
}
|
||
|
||
# MinIO 同域反代(避免 HTTPS 页面对 http://47.99.164.66:20004 混合内容)
|
||
location ^~ /minio/zkxw/ {
|
||
proxy_pass http://47.99.164.66:20004/zkxw/;
|
||
proxy_http_version 1.1;
|
||
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 X-Forwarded-Proto $scheme;
|
||
proxy_request_buffering off;
|
||
proxy_buffering off;
|
||
proxy_read_timeout 600s;
|
||
proxy_send_timeout 600s;
|
||
proxy_connect_timeout 10s;
|
||
add_header Access-Control-Allow-Origin * always;
|
||
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;
|
||
}
|
||
}
|
||
|
||
# ---------- 兼容旧入口:IP:10001(HTTP)----------
|
||
server {
|
||
listen 10001;
|
||
listen [::]:10001;
|
||
server_name 101.35.245.122 localhost 127.0.0.1;
|
||
|
||
root /root/zkxw/web-admin/dist;
|
||
index index.html;
|
||
client_max_body_size 500m;
|
||
client_body_timeout 3600s;
|
||
|
||
access_log /var/log/nginx/zkxw_admin_10001_access.log;
|
||
error_log /var/log/nginx/zkxw_admin_10001_error.log;
|
||
|
||
location = /health {
|
||
proxy_pass http://127.0.0.1:10002/health;
|
||
proxy_http_version 1.1;
|
||
proxy_set_header Host $host;
|
||
proxy_connect_timeout 10s;
|
||
proxy_read_timeout 30s;
|
||
}
|
||
|
||
location ^~ /docs {
|
||
proxy_pass http://127.0.0.1:10002;
|
||
proxy_http_version 1.1;
|
||
proxy_set_header Host $host;
|
||
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 $scheme;
|
||
}
|
||
|
||
location = /openapi.json {
|
||
proxy_pass http://127.0.0.1:10002/openapi.json;
|
||
proxy_http_version 1.1;
|
||
proxy_set_header Host $host;
|
||
}
|
||
|
||
# 附件上传:大文件要等正文传完再落存储,不能跟普通接口共用 120s
|
||
location ^~ /api/web/admin/attachment/upload {
|
||
proxy_pass http://127.0.0.1:10002;
|
||
proxy_http_version 1.1;
|
||
proxy_set_header Host $host;
|
||
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 $scheme;
|
||
proxy_request_buffering off;
|
||
proxy_connect_timeout 30s;
|
||
proxy_send_timeout 3600s;
|
||
proxy_read_timeout 3600s;
|
||
}
|
||
|
||
location ^~ /api/ {
|
||
proxy_pass http://127.0.0.1:10002;
|
||
proxy_http_version 1.1;
|
||
proxy_set_header Host $host;
|
||
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 $scheme;
|
||
proxy_connect_timeout 10s;
|
||
proxy_send_timeout 120s;
|
||
proxy_read_timeout 120s;
|
||
}
|
||
|
||
location ^~ /minio/zkxw/ {
|
||
proxy_pass http://47.99.164.66:20004/zkxw/;
|
||
proxy_http_version 1.1;
|
||
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 X-Forwarded-Proto $scheme;
|
||
proxy_request_buffering off;
|
||
proxy_buffering off;
|
||
proxy_read_timeout 600s;
|
||
proxy_send_timeout 600s;
|
||
proxy_connect_timeout 10s;
|
||
add_header Access-Control-Allow-Origin * always;
|
||
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;
|
||
}
|
||
}
|