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;
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.
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.