This commit is contained in:
vet
2026-04-20 10:45:06 +07:00
parent d26596addf
commit 868a22e940
8 changed files with 55 additions and 27 deletions

View File

@@ -7,7 +7,7 @@
# 2. 配置 GOPROXY自动测速选最快节点
# 3. 安装 Node.js / npm前端依赖
# 4. 安装 Docker基础设施容器
# 5. 安装 Nginx 并写入 PC/OpenIM 反代(域名 HTTP :80
# 5. 安装 Nginx 并写入 PC/OpenIM 反代(本机 HTTP :80;外部 HTTPS 由 LB/CDN 终止
# 6. 写入 /etc/profile.d/deploy-env.sh永久生效
#
# 用法:
@@ -244,7 +244,7 @@ _install_docker() {
}
# ──────────────────────────────────────────────────────────────────────────────
# 5. Nginx — PC / OpenIM 统一入口HTTP :80
# 5. Nginx — PC / OpenIM 统一入口(本机 HTTP :80
# ──────────────────────────────────────────────────────────────────────────────
_install_pc_nginx_proxy() {
step "安装 Nginx 并配置 OpenIM/PC 反代"
@@ -310,10 +310,10 @@ _install_pc_nginx_proxy() {
systemctl restart nginx
success " Nginx 反代已启用(配置: $conf_src"
info " 请放行 TCP 80curl -sS -H 'Host: ${proxy_domain}' http://127.0.0.1/nginx-health 应返回 ok"
info " HTTP :80 会代理 PC dev server + API + WebSocket"
info " 建议 .env.deploy-test 设置 PC_BACKEND_ORIGIN=http://${proxy_domain}"
info " 浏览器打开 http://${proxy_domain}/"
info " 本机 Nginx 仅监听 TCP 80curl -sS -H 'Host: ${proxy_domain}' http://127.0.0.1/nginx-health 应返回 ok"
info " 外部推荐入口 https://${proxy_domain} 应由 LB/CDN/其它网关终止 HTTPS 后转发到本机 :80"
info " 建议 .env.deploy-test 设置 PC_BACKEND_ORIGIN=https://${proxy_domain}"
info " 浏览器打开 https://${proxy_domain}/"
}
# all 时非 root 则跳过(不中断 Go/Node/Docker