Multiple webroots with custom CSR


Say I have the following two domains:

  1. hosted at /srv/http/example
  2. 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 -w /srv/http/subdomain/ -d

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


You could try the --webroot-map switch:

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


Thanks! That worked great!