Recent Changes - Search:

Général

Sécurité

Windows

Linux

Systeme

Réseaux

XBMC

Liens

PmWiki

edit SideBar

HAOSApacheReverseProxy

Apache2 Reverse proxy configuration

Create virtual host configuration and include below directives:

 ProxyPreserveHost On
 ProxyRequests Off
 ProxyPass / http://192.168.1.x:8123/
 ProxyPassReverse / http://192.168.1.x:8123/
 ProxyPass /api/websocket wss://192.168.1.x:8123/api/websocket
 ProxyPassReverse /api/websocket wss://192.168.1.x:8123/api/websocket

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

Home Assistant configuration

Add below lines in configuration.yaml:

 # Reverse proxy configuration
 http:
  cors_allowed_origins:
    - https://haos.liquidbox.net
  use_x_forwarded_for: true
  trusted_proxies: 
    - 192.168.1.x
    - 127.0.0.1
  ip_ban_enabled: false
Edit - History - Print - Recent Changes - Search
Page last modified on May 24, 2025, at 07:54 pm