1. Caddy version (caddy version
):
v2.4.6 h1:HGkGICFGvyrodcqOOclHKfvJC0qTU7vny/7FhYp9hNw=
2. How I run Caddy:
* {
root * /var/www/static/
file_server
}
a. System environment:
Debian 10
b. Command:
caddy run
3. The problem I’m having:
I’d like to configure Caddy to work with a fixed subdomain but variable domain, such as
static.*
where *
could be any domain.
This would point to a specific folder (not even customized per the domain, just a basic /var/www/static/
I can’t make it work. The SSL is not working even though I was hoping that if a hostname is pointing to Caddy, that means the DNS should be good and an automatic SSL should be executed.
So I tried with a full *
as the hostname, but it still doesn’t work.
Put simply, I’m trying to have static.*
work, regardless of the domain part. For instance, if you point static.example.com
to my server, you should be able to serve the /var/www/static/ from my server with a valid SSL certificate.
(I’m aware of the implications and the risks related to this, and this is definitely on purpose: it’s for a server serving a unique txt file needed for DNS validation).
Thank you in advance for your help!