mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 17:35:52 +03:00
[GH-ISSUE #526] Errors using reverse proxy with Home Assistant #445
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#445
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tech101us on GitHub (Jul 28, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/526
Very happy with the NGINX Proxy Manager. Really takes the leg-work out of configuring NGINX reverse proxies, and integrates with Letsencrypt to boot. Thank you JC21 for developing this and hope you're able to enjoy the coffee(s) despite world conditions.
So on to my problem...
I've no problem setting up a reverse proxy with letsencrypt certificate for an apache web server hosting some static web pages. Where I run into issues is with Home Automation Assistant. I'm running Home Assistant 0.112.4 atop Debian 10 Buster. The HA Lovelace Interface is just fine when I point my browser at the local URL (http://ip.add.ress:8123). I am prompted with the login page and then presented with the lovelace default view (http://ip.add.ress:8123/lovelace/default_view).
However, with a proxy host configured via the NGINX Proxy Manager for HA, I'm initially presented with the HA login screen. Yet once I login with my credentials, Home Assistant returns a page with the HA logo in the center of the page and the message "Unable to connect to Home Assistant.". This is obviously something I've not setup quite right in the reverse proxy, since it works fine if I go directly to the HA host URL. DNS is setup locally to point at the NGINX Proxy Manager for Home Assistant on my local network, and I also have an A record for the same for access externally. My router forwards TCP ports 80 and 443 to the NGINX Proxy Manager.
In NGINX Proxy Manager, I've setup a Proxy host that triggers on requests for my Home Assistant host name (ha.mydomain.com) and forward the request to http://ip.add.ress:8123 (the IP and port number of the Home Assistant VM). I've tried both with and without SSL (with and without a Letsencrypt certificate).
Please excuse my ignorance as this whole reverse proxy thing is fairly new to me.
Have attached an image of the Home Assistant Error Message presented when attempting to access via the proxy.
Grateful for any thoughts on this issue.
@jc21 commented on GitHub (Jul 28, 2020):
I'm willing to bet the problem is that HA doesn't know it's behind a proxy and is trying to open a WebSocket or other XHR using the address
http://localhost:8123. Or is otherwise not accepting connections from the IP that NPM is hosted with.A quick search for homeassistant reverse proxy gives me this page and I think step 9 is something you need to do, editing
configuration.yaml@tech101us commented on GitHub (Jul 28, 2020):
JC21, you are a lifesaver. Not sure what solved it, but I enabled WebSocket support in the NPM config for my HA host -and- I added the http: section to my HA configuration.yaml as mentioned in step 9 of the site you referenced. I'm now seeing the lovelace dashboard in all its glory using a letsencrypt certificate.
Thank you...Thank you...Thank you!!!