Adding new domain on nginx


#1

I have installed a new virtual domain and webroot on my nginx server (Ubuntu 16.04.5 LTS). Previously, there were already four other domains, all with their own Let’s Encrypt certificate. If I run certbot, I get the following menu:

Plugins selected: Authenticator nginx, Installer nginx

Which names would you like to activate HTTPS for?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: domain.com
2: www.domain.com
3: sub1.domain.com
4: sub2.domain.com
5: sub3.domain.com
6: newsubdomain.domain.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): c
Please specify --domains, or --installer that will help in domain names autodiscovery, or --cert-name for an existing certificate name.

The new domain is #6 (newsubdomain.domain.com). All the others have their own, existing certificates and are renewing normally.

If I want certbot to add newsubdomain.domain.com without changing the other certificates, do I just select it? Is there another method I should be using (e.g. -d newsubdomain.domain.com)?

I apologize for the basic question.


#2

Hi,

In the selection step, you should just enter ‘6’ so it will only attempt to request an certificate for newsubdomain.domain.com.

Thank you


#3

These two approaches both have the same effect. :slight_smile: (The menu of domains appears when you didn’t specify them with -d options.)


#4

So, just to be clear, if I do go this route, the previous 4 certificates should be unaffected and will continue to renew normally?


#5

That’s right. Certbot only replaces a pre-existing Certbot-managed certificate if

  • you specified the exact set of names in a pre-existing certificate,
  • you specified a strict superset of the names in a pre-existing certificate,
  • you specified the --cert-name option, or
  • you requested a renewal with certbot renew.

Otherwise, you’ll get a completely independent certificate.


#6

Thank you very, very much.


#7

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.