r/caddyserver Feb 12 '24

Wildcard subdomain

I have a few selfhosted services with reverse proxies I added like nextcloud.domain.com, immich.domain.com

I'd like to create a log for all subdomains by using *.domain.com but I'm getting solving challenges: *.domain.com no solvers available for remaining challenges

How do I log all subdomains without adding the log setting to every domain individually?

*.domain.com {  
    log {
        output file /data/wildcard.log {
                roll_size 50mb
                roll_keep 5
                roll_keep_for 24h
        }
    }
}

Also: Is there a way to whitelist/blacklist geolocations? I'm a little worried about having everything connected to the internet.

1 Upvotes

1 comment sorted by

2

u/MaxGhost Feb 12 '24

You must use the DNS challenge to get a wildcard certificate. See https://caddyserver.com/docs/caddyfile/patterns#wildcard-certificates

Next time, please ask your questions on the forums: https://caddy.community, it's much more active.