Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 106364

Apache reverse Proxy websocket

$
0
0

Hi im trying to be able to connect to HA from my own domain, but i have some problems.
I can reach the login page, but after i log in i only get “Unable to connect to Home Assistant.”

If i look in the console i see that i get a 400 on the websocket.
So i think it somthing with my virtual host config for websockets
I have followd this guid Reverse Proxy with Apache but without success.

My setup is that i have computer that is connected to the internet, then that computer in turn use proxy to HA that is on a other machine.

My current config is now

<VirtualHost *:443>
	ServerName ha.domain.com
	serverAlias www.ha.domain.com

	ProxyPreserveHost On
	ProxyRequests off
	ProxyPass /api/websocket ws://192.168.1.XX:8123/api/websocket
	ProxyPassReverse /api/websocket ws://192.168.1.XX:8123/api/websocket
	ProxyPass / http://192.168.1.XX:8123/
	ProxyPassReverse / http://192.168.1.XX:8123/

        ErrorLog ${APACHE_LOG_DIR}/error-ha_page.log
        CustomLog ${APACHE_LOG_DIR}/access-ha_page.log combined

	RewriteEngine on
	RewriteCond %{HTTP:Upgrade} =websocket [NC]
	RewriteRule /(.*)  ws://192.168.1.XX:8123/$1 [P,L]
	RewriteCond %{HTTP:Upgrade} !=websocket [NC]
	RewriteRule /(.*)  http://192.168.1.XX:8123/$1 [P,L]
</VirtualHost>

And i can login and use HA when i go to http://192.168.1.XX:8123 but i cant use HA when i use https://ha.domain.com

is there somthing im missing or any one that have any tip how to get this to work

// Best regards romaswe

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 106364

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>