I’m having an issue with Nginx, which I’m wondering if anyone else has seen.
I have 2 instances of HA setup one on an HA Blue and one on a Debian 11 server (setup correctly and compliant). I have NGinx Proxy Manager on the Debian server loaded as the HA Integration.
I have a mydomain.com domain name registered with google domains and DNS managed under cloudflare. The DNS is defined as follows;
In NPM I’ve defined and requested SSL certificates successfully for all the subdomains I require as well as the 2 HA instances mentioned above as follows;
The HA instance that is on the HA Blue calls fine, no problems, however the HA that NPM is hosted on as well as all the subdomains gives me the following error;
Anyone got any clues as to what I’ve got wrong?
I get essentially the error message i.e. there is an attempt to access homeassistant.xxxxxxxxxx.com multiple times. What I don’t get is why that is the case from 192.168.86.207, but does not happen from 192.168.86.210, it just resolves.
got preserved logs, and the following;
So I’m thinking that the Status code is key here, but when i look it up its defined as " Moved Permanently", which appears to indicate that its calling itself, hence the looping, but I can’t see why that would be the case.
That was why I included the cloudflare dns config info. My only other line of thought was that it is something I have not configured in NPM to stop it recursively calling the same location. The successful route https://hassio.xxxxxxxxxx.com is on a different IP to NPM and the unsuccessful route https://homeassistant.xxxxxxxxxx.com
I’m convinced the issue is with the NPM and nginx config.
I dont think the problem coming from cloudflare since its proxied internal domain only. Its have something to do with local IP setting since its effect all 3 other subdomain
I think I found the answer to my situation. I found it when reading a blog https://www.smarthomebeginner.com/traefik-2-docker-tutorial/
The tutorial is very good by the way, but one of the messages in there was that with cloudflare you need to set the domain SSL/TLS encryption mode to Full. “In addition to creating the DNS records, you will have to adjust Cloudflare’s SSL settings to avoid indefinite redirects.”.
The penny dropped and so i changed from Flexible (which I think is the default) to Full and lo and behold it stops the too many redirects situation. Hope this is useful to anyone else experiencing this situation.
Facing the same issue, however my setting was already on “full”. Still getting the error about too many redirects. What else could I be missing. Using the cloudflared addon I am successfully able to connect to my HA url from outside. I then set all CNAME entries to this HA url. And this is where things break for me, despite the correct setting mentioned. NPM with SSL certs worked before as well. Only thing changed is that I have to rely on the tunnel due to a provider change and no longer work with IPv4 addresses which I need the tunnel over the ddns part which worked before. But I definitely must miss something here which I cannot find out. Any other settings anyone did? I appreciate all suggestions as I am running out of things to test and still miss what fixes it.
EDIT:
Found the issue. Force SSL in NPM also needs to be disabled to not end up in this loop. Now it all works fine.