Files
web/nginx-proxy-manager.md
2026-03-17 01:00:11 +08:00

31 lines
1.5 KiB
Markdown
Raw 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.
# Nginx Proxy Manager 配置说明
已在 [Nginx Proxy Manager](https://npm.yuxindazhineng.com/nginx/proxy) 配置域名和强制 HTTPS对外统一用域名访问。
## 1. 在 NPM 中编辑该域名的 Proxy Host
- **Details**:域名填 **`yuheng.yuxindazhineng.com`****Forward Hostname / IP** 填本机 IP`192.168.10.241`**Forward Port** 填 **9528**(官网首页)。
- **SSL**:按需开启并强制 HTTPS。
## 2. Custom Locations路径转发
**Custom Locations** 中保证以下三条(端口与截图不一致的请改掉):
| Location | Scheme | Forward Hostname / IP | Forward Port | 说明 |
|----------|--------|------------------------|--------------|----------|
| `/` | `http` | `192.168.10.241` | **9528** | 官网首页 |
| `/admin` | `http` | `192.168.10.241` | **9529** | 管理后台(端口应为 9529不是 9289 |
| `/api` | `http` | `192.168.10.241` | **9527** | 后端接口 |
- 若当前是 `/index` 指向 9528建议改为 **`/`** 指向 **9528**,这样首页是 `https://域名/` 而不是 `https://域名/index`
- `/admin` 的端口请确认为 **9529**(截图里 9289 易误,应为 9529
- 务必增加 **`/api` → 9527**,否则前后台请求接口会 404。
## 3. 访问方式(对外统一域名)
- 官网:**https://yuheng.yuxindazhineng.com/**
- 管理后台:**https://yuheng.yuxindazhineng.com/admin/**
- 接口:**https://yuheng.yuxindazhineng.com/api/...**
前后台与接口同域,无需再设 `VITE_API_BASE`