Open spicysomtam opened 1 year ago
I managed to work around the issue by creating an addition dns name (cname) and virtual host in Apache. Hopefully this will help someone:
<VirtualHost _default_:443>
ServerName ha.mydomain.com
ErrorLog ${APACHE_LOG_DIR}/ha-error.log
CustomLog ${APACHE_LOG_DIR}/ha-access.log combined
ProxyPreserveHost On
ProxyRequests off
# Use a variable.
Define hass localhost:8123
ProxyPass /api/websocket ws://${hass}/api/websocket
ProxyPassReverse /api/websocket ws://${hass}/api/websocket
ProxyPass / http://${hass}/
ProxyPassReverse / http://${hass}/
RewriteEngine on
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.*) ws://${hass}/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
RewriteRule /(.*) http://${hass}/$1 [P,L]
SSLCertificateFile /etc/letsencrypt/live/mydomain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mydomain.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
My webserver is running apache and I have several paths working quite nicely (Jenkins, roundcube, gitea, gitweb). However with your script, I get this error:
My apache is using simply the following; maybe I need a ProxyPassReverse line as well?:
My apache and ha are running on different hosts; with ha running as a docker container. I can access locally using the ip address.
I get the login page, am able to login, and then just get a big home-assist icon in the middle of the web page and a url of https://my-domain/ha/?auth_callback=1&code=681... .
Thanks in advance.