-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 增加V1反向代理配置 增加V1反向代理配置 * 真实IP请求头相关内容 真实IP请求头相关内容 * Update q2.md * Update q12.md * Update config.mts --------- Co-authored-by: Kris <[email protected]>
- Loading branch information
1 parent
ddf7402
commit 7619634
Showing
4 changed files
with
57 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# 真实 IP 请求头 | ||
|
||
由于 V1 版本引入了本地账户机制,为防止外界暴力破解登录接口(Web 应用防火墙功能),程序需要准确获取客户端的真实 IP 地址。 | ||
此功能可通过路径 **`/dashboard/settings/waf`** 进行管理配置。 | ||
|
||
--- | ||
|
||
## 配置场景 | ||
|
||
根据服务部署方式的不同,有以下两种配置场景: | ||
|
||
### 1. 直接将面板服务映射至公网 | ||
|
||
- 勾选 **`使用直连 IP`** 即可,无需额外配置。 | ||
|
||
--- | ||
|
||
### 2. 使用 Web 容器反向代理或 CDN | ||
|
||
- 参考 [反向代理配置](/guide/q3.html) 文档。 | ||
- 在示例配置中,使用了 `nz-realip` 请求头,您可以沿用或修改为其他自定义值。 | ||
- 确保代理服务器正确设置请求头,并将客户端 IP 地址通过自定义头部传递给 Dashboard。 | ||
|
||
--- | ||
|
||
## 常见问题 | ||
|
||
### Q1: 配置错误导致无法访问面板或探针掉线,如何恢复? | ||
|
||
1. 修改面板配置文件: | ||
文件路径为 `/data/config.yaml`,找到以下配置项: | ||
```yaml | ||
realipheader: "" | ||
``` | ||
将 `realipheader` 设置为空值(`""`),保存并退出。 | ||
|
||
2. 重启面板服务。 | ||
|
||
3. 重新访问面板并验证连接是否恢复正常。 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# Agent 启动/上线 问题自检流程 | ||
1. `nc -v 域名/IP 通讯端口` 或者 `telnet 域名/IP 通讯端口` 来检验是否是网络问题,检查本机与面板服务器的出入站防火墙,如果无法判断问题可借助 <https://port.ping.pe/> 提供的端口检查工具进行检测。 | ||
2. 如果上面步骤检测正常,Agent 依然没有正常上线,请尝试关闭 SELinux,[如何关闭 SELinux?](https://www.google.com/search?q=%E5%85%B3%E9%97%ADSELINUX) | ||
2. 如果上面步骤检测正常,Agent 依然没有正常上线,请尝试关闭 SELinux,[如何关闭 SELinux?](https://www.google.com/search?q=%E5%85%B3%E9%97%ADSELINUX) | ||
3. 使用 `systemctl status nezha-agent-*` 查看 Agent 运行日志,以进一步排查. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters