I want my Home Assistant be visible on the web by using a second raspberry pi running Ubuntu and nginx reverse proxy. I need the reverse proxy so I can create multiple websites behind one IP address in the future.
I can access Home Assistant on 10.10.2.2:8123 correctly.
The first time I try to connect using mydomain.com I’m presented a Home Assistant login screen, and after putting in my credentials an error appears: ‘Unable to connect to Home Assistant’.
My config of the external ngnix reverse proxy (10.10.2.3):
server {
listen 80;
server_name mydomain.com;
location / {
proxy_pass http://10.10.2.1:8123/;
include proxy_params;
}
}
On the Home Assistant I also have a reverse proxy, But uninstalling that, does not solve the problem. The config:
In the configuration.yaml I have added http:
http:
use_x_forwarded_for: true
trusted_proxies:
- 10.10.2.3
- 10.10.0.0/16
I must be missing something . . . .
How can I access my Home Assistant using an external reverse proxy (but on my LAN), so I can use my domain mydomain.com to access Home Assistant and be able to run other websites in the future?
10.10.2.1 is my Home Assistant running on a raspberry PI 4
10.10.2.3 is the nginx reverse proxy running on Ubuntu server also on a PI 4