Home Assistant Reverse Proxy with Apache

<VirtualHost *:443>

ServerName home.example.org

ProxyPreserveHost On

ProxyRequests off

ProxyPass /api/websocket ws://localhost:8123/api/websocket

ProxyPassReverse /api/websocket ws://localhost:8123/api/websocket

ProxyPass / http://localhost:8123/

ProxyPassReverse / http://localhost:8123/

RewriteEngine on

RewriteCond %{HTTP:Upgrade} =websocket [NC]

RewriteRule /(.*) ws://localhost:8123/$1 [P,L]

RewriteCond %{HTTP:Upgrade} !=websocket [NC] RewriteRule /(.*) http://localhost:8123/$1 [P,L]

</VirtualHost>

Source: Reverse Proxy with Apache – Community Guides – Home Assistant Community

Home Assistant Reverse Proxy with Apache was last modified: May 23rd, 2021 by Jovan Stosic

Leave a Reply