Cloudflare Tunnel and Cloudpanel setup ERR_TOO_MANY_REDIRECTS for new domains

What is the name of the domain?

example.com

What is the error number?

ERR_TOO_MANY_REDIRECTS

What is the issue you’re encountering

I set up Cloudflare Tunnel and Cloudpanel on my self hosted pc. I can access panel.example.com After adding more domain to cloudpanel, i am adding them to cloudflare tunnel as public hostnames with http://localhost:80 and then cloudflare automatically adding CNAME dns to my dns settings.

Please edit my title to Tunnel lol
I cant edit the title. Bad start I guess here. :frowning:

too many redirects usually means you need to remove the redirect at the origin or set tls/ssl to full (strict). What is your current setting?

I tried full strict, full, flexible and off also. But no luck.

1 Like

I now modified nginx configuration to stop http to redirect https and now getting 502 bad gateway.

Can you share an image of that bad gateway error and/or does it look like this?

1 Like

Hi. I fixed this by configuring SSL to automatic in Cloudflare and making tweak on Cloudpanel (Nginx host file). I can now finally run it.
Here is what I commented/removed which was redirecting http to https from host file :

#  if ($scheme != "https") {
#    rewrite ^ https://$host$request_uri permanent;
#  }

If anyone trying to connect new sites via Cloudpanel and CloudPanel Tunnel, then this is the must do step. :shallow_pan_of_food:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.