How to renew two certificates for two different domains in the same server

Hello to All
I have a personal server running Ubuntu 18.04 and Apache2, i have only one public IP but two domains in the same server.
First time a create one certificate for each domain separately, and now only one of these certificates auto renew. I have to renew the other certificate manually, renaming the file mydomain1.org.conf.old to mydomain1.org.conf and running certbot renew command i can renew mydomain1, but the other domain mydomain2 doesn’t renew because it’s file mydomain2.org.conf has the extension .old, so I had to remove the .old extension to be able to renew this domain.
Is there any way to renew both certificates without had to rename the files manually?
Many thanks,
Abraham

There's nothing special about this setup - Certbot and Let's Encrypt can handle an unlimited number of domains and certificates on a single IP address.

I'm not sure why you started renaming files, but none of it should be necessary.

Starting from a zero state, all you would have to do is:

certbot --apache -d example.org -d www.example.org
certbot --apache -d my-other-domain.com -d www.my-other-domain.com

and Certbot would have done the rest for you.

2 Likes

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