I am setting letsencrypt for my server : Ubuntu 16.04 , Apache2
I can setup 1 certificate for 1 domain with each *.conf file in /etc/apache2/sites-avaiable.
Now I have 3 domain : domain1.abc.com , domain2.abc.com , domain3.abc.com . It was ran on 1 source /var/www/abc with a *.conf file . I am trying to setup 1 certificate for 3 domain but I cann’t .
Can you explain more about what you tried to do and what didn’t work? I don’t understand exactly what you mean when you say that you can’t set up one certificate for three domains (for example, you don’t know how to do that with a Let’s Encrypt client application, you don’t know how to configure that in your web server configuration, you get an error message when trying to obtain the certificate, or something else?).
Thanks for the explanation! Now I know what the problem is.
When you use letsencrypt --apache, Certbot (which is the new name for the letsencrypt program) obtains and installs the certificate. That is, it gets the certificate from the CA and then configures the web server to use the new certificate.
When you use letsencrypt certonly, Certbot only obtains the certificate, but does not install it. Your new certificate exists but your web server has not been configured to use it. This is the meaning of “certonly” (certificate only, but no installation).
One possibility is to try again with the --apache form, but this time specifying all of the domains (because that appeared to work). This will not delete the other certificate(s) but it may successfully install the new certificate for you.
As an alternative, if you can edit the Apache configuration files within /etc/apache2/sites-available, you can find the location where each virtual host is configured to use its own certificate (or, perhaps some of the virtual hosts have not yet been configured to use HTTPS at all). If you make them all use HTTPS with the certificate data from the correct location, they should all work after Apache has been restarted or reloaded.
If you have a recent enough version of Certbot, you can find out which certificates you have obtained and where they are stored on disk by running certbot certificates. However, you might not have a recent version, depending on how you installed Certbot on your system.