Hi fellow HA users,
I just installed HA using docker on an intel nuc.
I am using this nuc for serveral other services, such as nextcloud. I there fore have apache2 running on this nuc with a bunch of reverse proxy configured with ssl.
I am attempting to set up a reverse proxy for HA in a similar manner. I have configured apache2 to listen to a domain for HA and forward to port 8123. I am able to access the HA login page but when I try and login I am presented with a page saying that “unable to connect to Home Assistant”
I am able to login if I use the local ip and port 8123. There I can see the following log message.
Logger: homeassistant.components.http.ban
Source: components/http/ban.py:81
Integration: HTTP (documentation, issues)
First occurred: 18:09:58 (2 occurrences)
Last logged: 18:29:35
Login attempt or request with invalid authentication from _gateway (192.168.1.1). Requested URL: ‘/auth/token’. (Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36)
Initially I had an issue with not beeing able to load the login page. I got statuscode 400. This was resolved by adding:
http:
use_x_forwarded_for: true
trusted_proxies:
- "ip of the nuc hosting both apache and the docker container"
Any one have any ideas, suggestions or maybe guides I can follow?
All the guides I have found uses duckdns or other addons in HA to get ssl, but since this is handled by apache2 I’m thinking that this shouldn’t be necessary.
Thanks