Hi, since it took me some time to figure out how to add secured subdomains and mapped domains to an MS install, I thought this might helpful to somebody else, so here it is.
Assuming the WP MS installation is running on maindomain.com
and we are adding newdomain.com
#create subdomain / domain to map with php and letsencrypt certificate
ee site create newdomain.com --php --le
This will create a secured php site, that we now need to direct to the MS installation while insuring the LE certificate can be renewed automatically. So now:
#edit the site to allow for automatic let's encrypt renewal
ee site edit newdomain.com
On the configuration file, change
root /var/www/newdomain.com/htdocs;
For
root /var/www/maindomain.com/htdocs;
#entry to allow for automatic letsencrypt certfificate updates
location ~ /\.well-known{
allow all;
root /var/www/newdomain.com/htdocs;
}
TEST That everything is running as expected.
Let me know if it works for you or you have better configuration suggestions!
Cheers.
PS. a probably better way to make sure you configured everything correctly is installing let's encrypt last:
ee site create newdomain.com --php
ee site edit newdomain.com
ee site update newdomain.com --le