NGINX Add-On not seeming to work

Hi all,

I did spend a bit of time trying to get it to work and reading forums but i can’t seem to find any answers.

First of all, I have updated my configuration.yaml with the required x_forwarding and trusted proxies, and have verified that they are saved and loaded.

I’m running haOS on a raspberry pi 4. HA is running on port 8123. I’ve configured DuckDNS and LetsEncrypt, so my domain name from duckDNS is correctly pointing to my IP address. At first i forwarded port 8123 to my HA, and I had HA itself running on HTTPS by updating the config.yaml to use the cert’s key. That was working fine, but it did not let me access HA using HTTP, and the app broke when I was using it locally.

I’ve installed NGINX, the official ‘NGINX Home Assistant SSL Proxy’. it seems to be all configured correctly.

This is where things get weird. I’m able to access HA on port 8123 as normal. It’s on HTTP and is not secured with a cert.
However, when i try to access homeassistant.local on https it does not seem to work.

If I hit port 443 using HTTP, I can see that nginx is active, as it gives me an error saying that a HTTP request was sent to the HTTPS port. This is expected

However, when i hit port 443 using https, I get this error


It’s not a Nginx error, or a server responding with 400. Chrome is not able to establish a connection at all. The error ‘SSL_UNRECOGNISED_NAME_ALERT’ is not something I’ve come across before. I’m at a loss, it seems that nginx is not working when I send it a https request? If anyone has experienced something like this, some direction would be greatly appreciated. I tried to get the traditional connection logs from Nginx and it does not seem to be exposed to HA. I also cannot find the default NGINX configuration file that nginx uses to route requests. I’ve used nginx at work, but it looks like a lot has been abstracted away from us.

Thanks

Your error message seems to imply otherwise. How do you have it configured? What cert did you use?

Did you try the Documentation or Configuration tabs of the add-on?

Unless you created a certificate for homeassistant.local it isn’t going to work. You realize the certificate will only work for the FQDN configured on the certificate, right?

The cert is from LetsEncrypt, generated by the DuckDNS add-on.

yep, i dug through them, but don’t seem to find anything that’s related to this specific issue.

And yes, the certificate is for the FQDN provided by duckdns. However, even if the certificate is invalid, it should give me a certificate error, but give me to option to go ahead

It is giving you a certificate error, that the certificate isn’t recognized at all, not just the wrong FQDN.

Until you provide configuration details it’s difficult to assist any further.

Wow, so I think I just figured it out. Nginx is blocking requests if they do not use the right FQDN. So when i try to access it locally on the https port, it blocks me, but if i hit it using the fqdn it works. Interesting. Well, thank you anyways!

1 Like