Caddy v2, WordPress and the importance of *

Caddy v2, WordPress and the importance of *

So I spent an unpleasant amount of time troubleshooting Caddy v2 in front of a WordPress instance.

The issue was that of mixed content and despite using the recommended setting with https in Site Address (URL) and WordPress Address (URL) the system consistently served the frontpage without the stylesheet content (among other things) through http.

The relevant part of the Caddyfile:

reverse_proxy / <docker instance name>:80

Again the devil was in the detail.

The detail here was the slash which means “root only”. This was changed into an asterix (*) to proxy everything on the site:

reverse_proxy * <docker instance name>:80

Once the * was in place and Caddy restarted everything was as intended.

Knowledge gained, sleep lost

Leave a Reply

Your email address will not be published. Required fields are marked *