Hi all. I’m just getting started with Home Assistant and trying to integrate into my existing setup. Here are the details:
Ubuntu 18.04 physical server running docker
Running the homeassistant/home-assistant:stable container
Nginx reverse proxy configured on the Ubuntu server
What I’m trying to do is reverse proxy home assistant to https://mydomain.com/assistant. In my configuration.yml I have (note: my actual domain name changed to “mydomain”:
When I load this all up and point my browser to https://mydomain.com/assistant the page loads with just the light blue title ribbon and that’s it. If I point it to my root (i.e. https://mydomain.com, it works fine. Looking at the nginx error logs, I see this (Note: I’ve replaced my actual domain with “mydomain” and the IP address with “<ip_address>”):
2019/10/21 17:45:40 [error] 20089#20089: *2 open() "/usr/share/nginx/html/manifest.json" failed (2: No such file or
directory), client: <ip_address>, server: www.mydomain.com, request: "GET /manifest.json HTTP/1.1", host: "mydomain.com", referrer: "https://mydomain.com/lovelace"
2019/10/21 17:45:41 [error] 20089#20089: *2 open() "/usr/share/nginx/html/service_worker.js" failed (2: No such file
or directory), client: <ip_address>, server: www.mydomain.com, request: "GET /service_worker.js HTTP/1.1", host:
"chriskast.com", referrer: "https://mydomain.com/service_worker.js"
2019/10/21 17:45:43 [error] 20089#20089: *1 open() "/usr/share/nginx/html/lovelace" failed (2: No such file or direc
tory), client: <ip_address>, server: www.mydomain.com, request: "GET /lovelace HTTP/1.1", host: "mydomain.com", referrer: "https://mydomain.com/lovelace"
It looks like HA thinks it’s running at the root folder, hence the call to https://mydomain.com/lovelace instead of https://mydomain.com/assistant/lovelace. Am I missing some configuration here? I have 3 other https redirects to subfolders for other webapps and those work just fine.
Hmm. That’s a bummer. Then why bother having a “base URL” in the config? My current SSL cert is only for a single domain and I would prefer not to have to spend more for the wildcard one. But I guess I may have to eventually.
That’s a very good question. I’ve been using my CA provider for years and just didn’t think of anything else. I’ve seen people using LE…maybe it’s time I do as well. Thanks!
I really think supporting hosing ha in a reverse proxy sub directory is quite resonable and the functionality is explicitly supported by several other projects. How can i best add this as a feature request?