0

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)

cocomac
  • 116
  • 1
  • 5

0 Answers0