Router forwards port 80 and 443 to Ubuntu server running Apache. Server is managed with Webmin and Virtualmin.
I created a virtual server hassio.domain.com. I edited that server’s Proxy information and entered the internal IP address of my Raspberry Pi3 (http://192.168.x.x:8123).
When I access http://hassio.domain.com, the login screen for HASS.io pops up, but if I try to login, I get a screen that reads:
“Unable to Connect to Home Assistant” with a “retry” link.
I’m in exactly the same situation, same setup - router forwards 80 and 443 to apache, which proxies https://ha.domain.com to local_IP:8123.
I can login to local_IP:8123 just fine.
I see the login prompt at https://ha.domain.com both from inside and outside the LAN, but get an «Unable to connect to Home Assistant. -Retry» message.
I experienced the exact same issue and was able to solve this by adding 2 custom headers in my proxy server configuration.
Just add a Upgrade and Connection header like described in this post.
I forgot to update this post, but I eventually figured it out - I was only setting up the proxy for the base (frontend) access, but it seems the api/websocket also needs to be setup.
I am using NGinx but I had to add the X-Forwarded-For header with the value being the remote address (IP address) of the client. Otherwise I could see a “ip address changed” error in the network trace (but not on the UI).