0

I have this certificate

root@place:# certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log

-------------------------------------------------------------------------------
Found the following certs:
  Certificate Name: my.domain.com
    Domains: my.domain.com,mydomain2.com,my.domain3.com
    Expiry Date: 2019-04-17 09:11:20+00:00 (VALID: 55 days)
    Certificate Path: /etc/letsencrypt/live/my.domain.com/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/my.domain.com/privkey.pem

The certificate is served by NGINX:

root@place:/etc/nginx# cat nginx.conf | grep ssl
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
        ssl_prefer_server_ciphers on;
        listen       myportnumber ssl;
        # ssl
        #ssl    on;
        ssl_certificate /etc/letsencrypt/live/my.domain.com/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/my.domain.com/privkey.pem;

I want to add a new domain for my certificate: my.domain4.com According to certbot's guide, I can do it like this:

certbot certonly --cert-name my.domain.com -d my.domain1.com,my.domain2.com,my.domain3.com,my.domain4.com

First of all, am I doing it correctly with the above command?

Furthermore, when I run the command this happens

Saving debug log to /var/log/letsencrypt/letsencrypt.log

How would you like to authenticate with the ACME CA?
-------------------------------------------------------------------------------
1: Apache Web Server plugin - Beta (apache)
2: Spin up a temporary webserver (standalone)
3: Place files in webroot directory (webroot)
-------------------------------------------------------------------------------
Select the appropriate number [1-3] then [enter] (press 'c' to cancel):

I am not sure what to select here. My case should be NGINX but it is not listed. What should I choose?

2 Answers 2

1

I had to update to version 0.28 first. Then I got 4 options, including NGINX. I eventually used webroot as option (apache, standalone and nginx where not working for my case)

0

You actually want the expand option, since you're adding new domain to existing certificate.

--expand tells Certbot to update an existing certificate with a new certificate that contains all of the old domains and one or more additional new domains. With the --expand option, use the -d option to specify all existing domains and one or more new domains.

certbot --expand my.domain.com,my.domain2.com,my.domain3.com,my.domain4.com certonly 
1
  • That's not it: "Consider using --cert-name instead of --expand, as it gives more control over which certificate is modified and it lets you remove domains as well as adding them"
    – Tasos
    Feb 20, 2019 at 21:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .