1. The problem I’m having:
I’m trying to set up a Caddy server that handles both wildcard subdomains and root domain requests, serving static files from appropriate publicly accessible S3 buckets
Example Scenario:
If someone visits https://blog.example.com, it should serve files from https://mys3bucket.com/blog/ If someone visits https://example.com, it should serve from a mys3bucket.com/home/ bucket
2. Error messages and/or full log output:
/
3. Caddy version:
v2.8.4 h1:q3pe0wpBj1OcHFZ3n/1nl4V4bxBrYoSoab7rL9BMYNk=
4. How I installed and ran Caddy:
a. System environment:
Fedora 40
b. Command:
dnf install 'dnf-command(copr)'
dnf copr enable @caddy/caddy
dnf install caddy
c. My complete Caddy config:
{
admin off
}
http://*.example.com {
reverse_proxy https://myS3bucket.com/{labels.2}
}
5. Links to relevant resources:
/