fix: API 宿主机端口改为 8088,nginx 反代同步

Made-with: Cursor
This commit is contained in:
whm
2026-03-17 20:51:37 +08:00
parent ed930cbe12
commit 9babb2ac7e
2 changed files with 4 additions and 4 deletions

View File

@@ -50,9 +50,9 @@ sudo systemctl reload nginx
|----------|----------|------| |----------|----------|------|
| `https://yuheng.yuxindazhineng.com/` | 9528 | 前台 | | `https://yuheng.yuxindazhineng.com/` | 9528 | 前台 |
| `https://yuheng.yuxindazhineng.com/admin/` | 9529 | 管理后台 | | `https://yuheng.yuxindazhineng.com/admin/` | 9529 | 管理后台 |
| `https://yuheng.yuxindazhineng.com/api/` | 9537 | API | | `https://yuheng.yuxindazhineng.com/api/` | 8088 | API |
确保 `docker compose` 已启动,且本机 9537、9528、9529 已监听。 确保 `docker compose` 已启动,且本机 8088、9528、9529 已监听。
## 4. 新服务器首次安装 Nginx ## 4. 新服务器首次安装 Nginx

View File

@@ -45,9 +45,9 @@ server {
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
} }
# API宿主机端口 9537与 9527 冲突时改用 9537 # API宿主机端口 8088
location /api/ { location /api/ {
proxy_pass http://127.0.0.1:9537/; proxy_pass http://127.0.0.1:8088/;
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;