Home Assistant Core Remote access step by step version:20221103
0
Check configuration->basic->log for reverse proxy error
. Note the IP address in the error message. if you don’t have it, then you have a different problem.http:
use_x_forwarded_for: true
trusted_proxies:
- XXX.XXX.XXX.XXX # Add the IP address of the proxy server
Restart your Home Assistant server.
http:
use_x_forwarded_for: True
trusted_proxies:
- 127.0.0.1/24
- ::1/128
server {
listen 80;
server_name *.frp.yourdomain.cn frp.yourdomain.cn;
location / {
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# 下面两行提供websocket支持,homeassistant需要
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://127.0.0.1:8080;
}
}
root@raspberrypi:~# sudo systemctl status frpc.service
● frpc.service - Frp Client Service
Loaded: loaded (/etc/systemd/system/frpc.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2022-11-26 03:34:10 CST; 1 day 4h ago
Main PID: 426 (frpc)
Tasks: 7 (limit: 2200)
Memory: 16.0M
CPU: 2min 10.539s
CGroup: /system.slice/frpc.service
└─426 /usr/local/frp/frpc -c /usr/local/frp/frpc.ini
Logger: homeassistant.components.http.forwarded
Source: components/http/forwarded.py:114
Integration: HTTP (documentation, issues)
First occurred: 08:54:28 (67 occurrences)
Last logged: 09:15:02
A request from a reverse proxy was received from 127.0.0.1, but your HTTP integration is not set-up for reverse proxies