Moving WP Multisite – getting infinite redirects
-
Hello,
I recently moved my WordPress Multisite to a new provider. I’m running WordPress using a Docker container with Caddy as a reverse proxy (for SSL).
df83e048e8b2 caddy:2-alpine "caddy run --config …" 23 hours ago Up 23 hours 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 2019/tcp caddy 5f3bc6765cfa wordpress:5.8.2-apache "docker-entrypoint.s…" 23 hours ago Up 23 hours 0.0.0.0:8081->80/tcp wordpress 7dce1a66b0fb mysql:5.7 "docker-entrypoint.s…" 23 hours ago Up 23 hours 3306/tcp, 33060/tcp wordpress-mysql
My relevant Caddy config is below (I’m using this Caddy container for a Dokuwiki site as well with no problems):
{ email [email protected] acme_ca https://acme-v02.api.letsencrypt.org/directory } wp.shand.net, adam.nz { reverse_proxy wordpress:80 { } }
I copied the old WordPress files across to the new setup and restored the MySQL database and things are mostly working.
The DOMAIN_CURRENT_SITE is
wp.shand.net
and the site I’m trying to get to work isadam.nz
.The problem I’m having is that:
If I use
https://adam.nz
as the “Site Address,” the site works but I get SSL errors. I believe this is because Caddy automatically forwards to https but the HTML generated by WordPress has all the images and CSS files with http links.? http adam.nz HTTP/1.1 308 Permanent Redirect Connection: close Content-Length: 0 Date: Thu, 30 Dec 2021 06:56:25 GMT Location: https://adam.nz/ Server: Caddy ? https adam.nz | egrep "adam.nz.*.css" | head <link rel='stylesheet' id='ugb-style-css-css' href='https://adam.nz/wp-content/plugins/stackable-ultimate-gutenberg-blocks/dist/frontend_blocks.css?ver=2.17.5' type='text/css' media='all' /> <link rel='stylesheet' id='block-gallery-frontend-css' href='https://adam.nz/wp-content/plugins/block-gallery/dist/blocks.style.build.css?ver=1.1.6' type='text/css' media='all' />
If I use
https://adam.nz
as the “Site Address,” I get infinite redirects.? https -f adam.nz HTTP/1.1 301 Moved Permanently Cache-Control: max-age=3600 Content-Length: 0 Content-Type: text/html; charset=UTF-8 Date: Thu, 30 Dec 2021 07:01:01 GMT Expires: Thu, 30 Dec 2021 08:01:02 GMT Location: https://adam.nz/ Server: Caddy, Apache/2.4.51 (Debian) X-Powered-By: PHP/7.4.27 X-Redirect-By: redirection ? https -F adam.nz https: error: Too many redirects (--max-redirects=30).
I can’t figure out why I’m getting infinite redirects when I enable https in the “Site Address” and I’m not sure how to debug this.
Many thanks for any help.
Adam.- This topic was modified 3 years, 2 months ago by .
- This topic was modified 3 years, 2 months ago by .
- This topic was modified 3 years, 2 months ago by .
- This topic was modified 3 years, 2 months ago by .
- This topic was modified 3 years, 2 months ago by .
The page I need help with: [log in to see the link]
- The topic ‘Moving WP Multisite – getting infinite redirects’ is closed to new replies.