Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Accepted Answer
Answer given at the letsencrypt support forums
https://community.letsencrypt.org/t/setting-up-letsencrypt-for-a-single-wordpress-multisite-installation-with-many-domains/46511
Basically, each domain needs it’s OWN .conf file as well as each file having the Servername declared. Then after system linking into sites-enabled and an apache2 restart, certbot will install the additional certificates properly. See the thread at letsencrypt for more details.
Hi there,
I just came across this question.
Indeed, what I would usually do in such a case is to create separate virtual hosts for each website.
So let’s have the following scenario as an example:
/var/www/htmlexample1.com and example2.com.So rather than using only the default catch-all Apache virtual host (Vhost for short), you could create 3 separate virtual hosts for each domain name:
example1.com:<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ServerName example1.com
ServerAlias www.example1.com
<Directory /var/www/html/>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
example2.com:<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ServerName example2.com
ServerAlias www.example2.com
<Directory /var/www/html/>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
That way you could issue separate SSL certificates for each domain name, and also set up HTTP to HTTPS redirects without the domain names affecting each other.
Note how both Vhosts have the same DocumentRoot set to /var/www/html so that they could both be pointing to the same WordPress multisite installation.
For more information on Apache virtual hosts, make sure to check out this tutorial here:
https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-18-04
Once you have the two separate virtual hosts you can issue Let’s Encrypt certificates using certbot as normal. You can follow the steps from this tutorial here on how to do that:
In case that you have more domain names, just follow the same procedure by adding separate Vhosts for each domain name.
Regards, Bobby
This comment has been deleted