Loading failed for the <script> with source “http://10.0.0.104/static/webcomponents-bundle.js”. hass:1
Loading failed for the <script> with source “http://10.0.0.104/frontend_latest/core-5cad4d70745d4596fd4b733ac1d4cdfd.js”. hass:1
Loading failed for the <script> with source “http://10.0.0.104/frontend_latest/app-6e4d53ede29a686d41a2bb0807ecd12c.js”. hass:1
Loading failed for the <script> with source “http://10.0.0.104/frontend_latest/hass-icons-ee13d5e1c4eddae529f72ccb088bbad3.js”.
I believe HA isn’t suitable for a path based reverse proxy configuration (i.e. you can’t tell HA to prefix every single URL with your selected path). Try a separate virtual host with different hostname instead.
Thanks for your reply, but this is not really an option for me. My router (fritzbox) doesn’t support multiple hostnames per host and it needs another SSL certificate
now i found this open feature request from 2016. But I do not think that will do something there.
In case your still dealing with this. I agree using relative paths would have been nice when they started this project. I put together a hacky rewrite for apache, this could also be translated into nginx. There is one known issue debugging didn’t expose anything but when it loads for the first time you will get a spinning wheel. If you click dashboard everything will load fine. These rules are setup for hosting from the context root of “/home/”. This is considered pretty hacky since it uses alot of extra context roots which might be in use by other applications on your root. Second reason is future updates may break this.
I don’t think this is deemed important enough that anyone is working on this. But feel free to chip in and contribute functionality to this project that is important to you and may be for others.
Wrong IP Address showed in login notifications within Home Assistant
Websockets don’t work properly
Addons don’t work
<VirtualHost *:80>
ServerName homeassistant.adamoutler.com #MODIFY to your host name
ServerAdmin [email protected] #MODIFY to your email
RewriteEngine On
# This will enable the Rewrite capabilities
RewriteCond %{HTTPS} !=on
# This checks to make sure the connection is not already HTTPS
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
#Declare server
ServerName homeassistant.adamoutler.com #MODIFY to your host name
ServerAdmin [email protected] #MODIFY to your email
#fix detecting incorrect login IP by proxy server
RemoteIPInternalProxy 192.168.1.1 #MODIFY to your proxy, or delete if you aren't using a firewall
RemoteIPHeader X-Forwarded-For
#proxy server setup
ProxyPreserveHost On
ProxyRequests Off
ProxyPass /api/websocket ws://192.168.1.8:8123/api/websocket #MODIFY to your HA IP:Port
ProxyPassReverse /api/websocket wss://192.168.1.8:8123/api/websocket #MODIFY to your HA:Port
ProxyPass / http://192.168.1.8:8123/ #MODIFY to your HA IP:Port
ProxyPassReverse / http://192.168.1.8:8123/ #MODIFY to your HA IP:Port
#fix websockets for addons and apis
RewriteEngine On
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteRule ^/?(.*) "ws://192.168.1.8:8123/$1" [P,L] #MODIFY to your HA IP address
#Set security on certan areas(some redacted)
<Location "/">
Satisfy any
# Include /path/to/mySecuritySettings.conf
</Location>
<Location "/api">
Satisfy any
</Location>
#HTTPS certs
# Include /path/to/sites-available/ssl.conf
# Include /path/to/options-ssl-apache.conf
# SSLProxyEngine On
# SSLCertificateFile /path/to/my-chain.pem
# SSLCertificateKeyFile /path/to/my-cert.pem
</VirtualHost>
</IfModule>
What is the exact reverse proxy you are trying to use?
I have a reverse proxy setup without opening any ports in the router via a zero trust network, if you provide some more details i might be able to help.
Edit:
i run a docker version (hoass core) with cloudflare tunnel (zero trust)
The tunnel converts the http into a https, and with some cloudflare firewall rules you can limit access to a VPN connection or to certain IP adresses.
I am trying to have HA as subdomain to avoid having additional port. All my applications are the same way proxied. I will play around with above example and see change external url.