I am trying to use Caddy for the first time. I want to be able to serve several subdomains. Caddy requests SSL certificates from Let's Encrypt. I have managed to get this to work ok with only one domain name in the caddyfile.
However, suppose I have
www.example.com, test.example.com {
... lots of settings
}
I am relying on the Let's Connect server calling back into one of those subdomains (i.e. not using DNS TXT records). But this raises questions:
- Which one does Caddy use when it requests a certificate?
- Is there a way to specify which one I want it to use?
(In the example above there are just two subdomain, but actually I'd like to know how to get it to work with more than two.)
--
EDIT: When I try this on test.example.com
, I get an error (note: I have concealed my actual domain names):
Activating privacy features...2016/11/21 07:47:41 [www.example.com] failed to get certificate: acme: Error 403 - urn:acme:error:unauthorized - Invalid response from http://www.example.com/.well-known/acme-challenge/ALmqQ8Vl5fvPF91tvqw2zigHlPoRRgTGR2GaLtgX3-A [134.92.240.68]: 404
Caddy prints more detail essentially repeating the same information, then it terminates.