I have been using an apache reverse proxy to provide SSL to my home assistant instance for some time. It’s on it’s own subdomain, not using a subdirectory, so “https://hass.domain.tld”. Some time ago, this broke; I’m not sure exactly when because I don’t log into the web interface often but use the android app which never broke, but now the web interface doesn’t load when using the proxy address. It still works fine using the IP of the server and port 8123. I have a feeling it was when the change where “base_url” was deprecated in favor of an internal/external url.
It appears to be the same problem here, though I am NOT using a subdirectory: Apache reverse proxy with path
If I view developer tools it looks like this in the console:
app.d030393d.js:1277 The main 'lit-element' module entrypoint is deprecated. Please update your imports to use the 'lit' package: 'lit' and 'lit/decorators.ts' or import from 'lit-element/lit-element.ts'. See https://lit.dev/msg/deprecated-import-path for more information.
32207 @ app.d030393d.js:1277
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/app.d030393d.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/d8d62d7b.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/d472da3a.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/0ba72620.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/a713a0b9.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/e6d15021.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/f0375f6d.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/7dda68ed.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/bbb99704.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/54e18809.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/4dafd5ad.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/dee8b07c.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/9954b0ad.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/6181ae55.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/9f8a8a7d.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/20ba3015.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/ea4da6d0.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/ce1e7eb9.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/e12defbf.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/db675a41.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/255ee87a.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/9da7fc28.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/484f044e.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/dcf986e4.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/207b74c3.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/5bc08377.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/7d7b6b26.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/be134ab8.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/ea13d074.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/c5776de1.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/00b05ba1.js.map: Load canceled due to load timeout
DevTools failed to load source map: Could not load content for https://hass.domain.tld/frontend_latest/76fe80d4.js.map: Load canceled due to load timeout
The apache configuration I have which used to work is this, using the IP of the home assistant server:
<VirtualHost *:80>
ServerName hass.domain.tld
Redirect permanent / https://hass.domain.tld/
</VirtualHost>
<VirtualHost *:443>
ServerName hass.domain.tld
ErrorLog ${APACHE_LOG_DIR}/hass.domain.tld-error.log
CustomLog ${APACHE_LOG_DIR}/hass.domain.tld-access.log combined
SSLEngine On
SSLCertificateFile /etc/letsencrypt/live/hass.domain.tld/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/hass.domain.tld/privkey.pem
# Other Apache Configuration
SSLProxyEngine On
ProxyPreserveHost On
ProxyPass / http://10.1.###.###:8123/
ProxyPassReverse / http://10.1.###.###:8123/
ProxyPass /api/websocket ws://10.1.###.###:8123/api/websocket
ProxyPassReverse /api/websocket ws://10.1.###.###:8123/api/websocket
RewriteEngine on
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.*) ws://10.1.###.###:8123/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
RewriteRule /(.*) http://10.1.###.###:8123/$1 [P,L]
</VirtualHost>
My http integration looks like this, and yes it’s the correct IP of the proxy server in the actual one
http:
use_x_forwarded_for: true
trusted_proxies:
- 10.1.###.###
- 127.0.0.1
Any help is appreciated! Here is my system info, currently running on a Raspberry Pi 4:
System Health
version: core-2021.10.3
installation_type: Home Assistant OS
dev: false
hassio: true
docker: true
user: root
virtualenv: false
python_version: 3.9.7
os_name: Linux
os_version: 5.10.17-v8
arch: aarch64
timezone: America/Los_Angeles
GitHub API: ok
Github API Calls Remaining: 5000
Installed Version: 1.15.2
Stage: running
Available Repositories: 879
Installed Repositories: 6
logged_in: false
can_reach_cert_server: ok
can_reach_cloud_auth: ok
can_reach_cloud: ok
host_os: Home Assistant OS 6.4
update_channel: stable
supervisor_version: supervisor-2021.10.0
docker_version: 20.10.7
disk_total: 58.0 GB
disk_used: 6.9 GB
healthy: true
supported: true
board: rpi4-64
supervisor_api: ok
version_api: ok
installed_addons: Terminal & SSH (9.2.1), File editor (5.3.3), Mosquitto broker (6.0.1), TasmoAdmin (0.15.0)
dashboards: 1
resources: 1
views: 4
mode: storage