Add a domain using certbot-auto

Few month ago I create a certificates using certbot-auto command like this:
certbot-auto certonly --webroot -w /var/www/html/833 -d 833.pztop.com

Now I am trying to setup another virtual website on the same server using domain name tju83.pztop.com. I already created DNS A record. How how to add this new domain?

The new domain home dir is /var/www/html/tju83

To add a domain using certbot-auto, find the certname of the existing certificate using certbot-auto certificates.

Then run using certbot certonly --cert-name example.org -d old-domain.example.org -d new-domain.example.org (making sure to list every single domain that should be in the new certificate). For example, in this situation you might use

certbot-auto certonly --cert-name 833.pztop.com -d 833.pztop.com -d tju83.pztop.com

Since you said that there is a different webroot for the new name, you should specify all of the webroots:

certbot-auto certonly --webroot --cert-name 833.pztop.com -w /var/www/html/833 -d 833.pztop.com -w /var/www/html/tju83 -d tju83.pztop.com

Thank you schoen for the quick help.

I already tried the command you posted. But with error:

Failed authorization procedure. tju83.pztop.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://tju83.pztop.com/.well-known/acme-challenge/1veG2Q_QnLSc9HUhQJOJAq5fy0OLGhsUQOmuq_lWUOE: "

404 Not Found

Not Found

<p"

IMPORTANT NOTES:

Now it works.

I simply copied and modified the apache config file for 833 to tju83. I figured out that I need disable the rewite lines before get the SSL setup.

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