Too many redirects

  • Used Zammad version: This is Zammad version 5.0.x
  • Used Zammad installation type: apt package installation
  • Operating system: Ubuntu 20.04 Server
  • Browser + version: Oprea, Chrome, Firefox

Expected behavior:

Can access the web console via host name

Actual behavior:

When I try, I get an error “too many redirects”

Steps to reproduce the behavior:

Try to access the web site

This was all working until a recent upgrade which seems to have caused issues.
I can get to the site via IP address from the local network, but not from the external url which was working.

I can’t see anything in the logs that helps me, so am at a bit of a loss. The site is using letsencrypt certs and they check out OK with certbot and the nginx config seems to be OK.

Any ideas where to start looking?

Ta.

Hi, I faced this issue in combination with a reverse proxy, and also when automatically redirecting from http to https. Do you use anything of this?

The redirect to https, yes. I’m using cloudflare to handle the dns and tunneling to the service.

In your Cloudflare setup under SSL/TLS what encription mode are you using?

Hi @Sutho thanks for taking a look. I have it set to Full. Should it be something else?

I would try changing to strict. This worked for me. I would not do it across all your sites / sub domains. I would go to rules and build a page rule and just change for this subdomain.

Hi Sutho,

sorry for the really long delay in getting back to this.

I’m just mucking around with cloudflare now trying to get this to go through the tunnel without error and so far no dice.

I set up a page rule as you suggested, but that still throws the same error.

I’ve checked that the cloudflared tunnel is up and it is… I’m really struggling to work this out now.

I’ve just turned on the network tab under developer tools and can see that it is just looping with 301 redirects time after time so the error message is infact correct.

No clue why though.

OK, I now know what the problem is, its the http->https redirect in the nginx configuration, but, I have no clue how to take it out without breaking everything. I want to get rid of all of the certbot stuff and just have the site http because cloudflare is taking care of the https stuff.

Any help??

Peter.

Fixed… I just removed everything to do with letsencrypt and set the main server setting to listen on port 80… very cool.

Spoke too soon… can’t log in now, CSRF token validation failed… sigh.

Fixed again… needed to change X-Forwarded-Proto to $scheme… it should stay as https it seems.

Sounds like you had all the same challenges I had. I removed letsencript as well but loaded a Cloudflare Cert as I still wanted secure traffic between Cloudflare and the server.

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