I recently wanted to add another domain to an existing SSL certificate on a server and it broke a few things and overwrote my 000-default-le-ssl.conf file.
I would like to know the correct steps for simply adding another domain name to an existing Lets Encrypt SSL certificate.
My scenario is that I simply want to point another domain to the same directory/folder to have both domains reaching the same content, such as
Existing https://sales.domain.com points to /var/www/html and I wish to point another https://sales.newdomain.com (previously configured via DNS with an A record to the same IP address as my original sales.domain.com
I did this previously as explained and ran these commands without success:
I did not save the responses, but it did not work.
I then ran this command, which did actually add the second domain, but I had many issues with 000-default-le-ssl.conf and other issues I do not recall…
As this is on a production server, I’d like to know what the correct command would be to simply add another domain to an existing, working SSL cert that will point to the same directory. I’d rather have the correct command than “trying” things and making a mistake on a live server.
Thank you in advance.