Multiple webroots with custom CSR


#1

Say I have the following two domains:

  1. example.com hosted at /srv/http/example
  2. subdomain.example.com hosted at /srv/http/subdomain

Both domain names are listed as SANs in the CSR. I know without using a custom CSR, I can just request for a certificate using the following:
> letsencrypt certonly --webroot -w /srv/http/example/ -d example.com -w /srv/http/subdomain/ -d subdomain.example.com

My question is how can I request for the certificate if I have to use a custom CSR with multiple webroots? Thanks!


#2

You could try the --webroot-map switch:

letsencrypt --yourotherstuff --csr /path/to/csr --webroot-map ‘{“example.com”: “/path/to/example.com/webroot”, " otherdomain.com": “/path/to/other/webroot”}’


#3

Thanks! That worked great!