添加 docs/nginx.mdx
This commit is contained in:
21
docs/nginx.mdx
Normal file
21
docs/nginx.mdx
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# 使用nginx配置有一个域名问题
|
||||||
|
|
||||||
|
一直配置域名访问失败,不能访问,加端口才能正常访问
|
||||||
|
|
||||||
|
homeassisant的home-assisatant.log的错误信息是
|
||||||
|
|
||||||
|
```
|
||||||
|
ERROR (MainThread) [homeassistant.components.http.forwarded] Received X-Forwarded-For header from an untrusted proxy 192.168.65.1
|
||||||
|
```
|
||||||
|
|
||||||
|
修改的办法, 在`trusted_proxies`添加信任的的ip地址,比如`192.168.65.1`
|
||||||
|
|
||||||
|
```sh
|
||||||
|
http:
|
||||||
|
use_x_forwarded_for: true
|
||||||
|
trusted_proxies:
|
||||||
|
- 127.0.0.1
|
||||||
|
- 192.168.65.1 # ✅ 加上这个 IP
|
||||||
|
ip_ban_enabled: true
|
||||||
|
login_attempts_threshold: 5
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user