WordPress too many redirects

Hey…

I installed WordPress and now tried to easily configure the caddyfile… but now it keeps redirecting (server response: too many redirects). I find nothing in the access.log or error.log.

I used it the same way also for other projects and it worked perfectly.

this is my caddy config:

https://blabla.renka.de {
    log /var/log/blabla_access.log
    errors /var/log/blabla_error.log
    proxy / wordpress.blabla.rancher.internal {
        transparent
    }
    tls rene@renka.de
    gzip
}
blabla.renka.de {
    redir / https://blabla.renka.de{uri}
}

https://www.renka.de {
    log /var/log/renka_access.log
    errors /var/log/renka_error.log
    proxy / nodejs.renka.rancher.internal:5000 {
        transparent
    }
    tls rene@renka.de
    gzip
}
renka.de {
    redir / https://www.renka.de{uri}
}

This is pretty urgent and I am really confused. The wordpress is fresh, so there is no siteurl in the wp_config.

From my exsperiance I had this issue and it was caused by Cloudflare - If you are using Cloudflare then I suggest changing SSL to full strict

I hope this helps.

Hey Mark,

thanks for the suggestion. I dont use services like Cloudflare :confused:

Ah I hope you find a quick fix shortly! Sorry I couldn’t help further kinda new to this myself. From past support request on this site responses have always been very fast and helpful.

Good Luck !

blabla.renka.de {
    redir / https://blabla.renka.de{uri}
}

Looks like a redirect loop to me. Try

http://blabla.renka.de {
    redir / https://blabla.renka.de{uri}
}

Or even better - remove that block entirely, remove https:// scheme from the above vhost, and let Caddy do that part for you! :slight_smile:

4 Likes

Oh gosh… thank you Whitestrake!!!

I used this block like in “renka.de” to force to “www.renka.de”.

Thanks a tons! Some times I dont see those stupid issues.

I’m super happy I can direct people here from Twitter or anywhere else and trust the community to chip in and help. :blush: Thanks for answering René’s question, and so quickly!

2 Likes

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