Hey all,
I’m currently running caddy as a docker container in front of dockerized wordpress multisite install.
Everything works great so far!
Since LetEncrypt does not support wildcard certificates yet, I use the following options in my Caddyfile:
www.example.com {
redir example.com{uri}
}
example.com, *example.com {
...
tls {
max_certs 20
}
#wordpress settings like fastcgi yadda yadda
}
As I stated this works quite well, but I did read, that it’s not recommended to create OnDemand certificates on a broader scale and I’m searching for a way to dynamically insert new specific subdomains to the caddy configuration when created with WP multisite.
Another thing is the domain mapping. For every external domain I map to wordpress I have to add a block like:
www.anotherdomain.com {
redir anotherdomain.com{uri}
}
to the caddyfile. After that ‘anotherdomain.com’ has to be added to the block with all the wordpress settings.
Are there any solutions for this kind of ‘problem’? I thought maybe there is a way to import a dynamic list of domainnames which are mapped to one config block like this:
import ('domainnames.txt'){
tls ...
fastcgi ...
}
And just append new domains from wordpress and the domain mapping to the domainnames.txt file - but that’s just thinking out loud…
I’m really grateful for any kind of suggestions and tips! Thank you in advance and keep up the great work on Caddy!
Cheers Julian