Score:0

How to have one tls directive apply to all domains in my Caddyfile?

br flag

I'm running Caddy on Debian 11.

Here's what my Caddyfile looks like. I've removed my domain name

[subdomain name removed].example.org {
        tls /certs/_.example.org.crt /certs/_.example.org.key
        reverse_proxy :8002
}
[subdomain name removed].example.org {
        tls /certs/_.example.org.crt /certs/_.example.org.key
        reverse_proxy :8001
}

[subdomain name removed].example.org {
        tls /certs/_.example.org.crt /certs/_.example.org.key
        reverse_proxy :8086
}
[subdomain  name removed].example.org {
        tls /certs/_.example.org.crt /certs/_.example.org.key
        reverse_proxy :8003
}

This works, but having to repeat tls /certs/_.example.org.crt /certs/_.example.org.key is somewhat annoying - is there a way to specify that directive once and have it automatically apply to all my subdomains? (This is a non-internet-facing server, so I manually get the certificate to enable HTTPS on my domain - I run a local DNS server that has all the domains pointed to the local IP of my server)

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.