I’m trying to setup a Cloudflare tunnel to Nginx proxy manager to access all my self hosted services externally.

If I have my tunnel forward to http://nginx:80 and have force TLS turned off in Nginx proxy host everything works fine.

If I turn on force TLS I get a too many redirects error. I did some googling and found that you need to turn on full encryption rather than flexible in Cloudflare to fix this and I tried that and I still get the same issue.

If I change the tunnel to forward to https://nginx:443 I get a 502 bad gateway error, even if I turn off TLS verify.

Can anyone please help me fix these issues?