1

I have a web server that has a domain name sub.mydomain.com, and I have installed multiple WordPress sites in /www/html/, hence, I have a few sites with the same domain name. For e.g. sub.mydomain.com/site1, sub.mydomain.com/site2 and sub.mydomain.com/site3.

The sites all run on the apache default virtual host conf file.

Now that I plan to enable SSL for few of the sites and I encountered an issue because there is only one conf for all sites. I am not sure how separate each site and create a conf for each of the sites so that I can control which sites will be SSL enabled and which sites will not.

Would this be possible? Any advices would be appreciated!

Xavier
  • 11

1 Answers1

0

The SSL/TLS certificate is issued per FQDN, for example: sub.mydomain.com or mydomain.com, etc. The certificate file could contains certificates for couple FQDNs. For example if you are using "Let's Encrypt" (CertBot) the following command will generate two certificates placed in the same file:

sudo letsencrypt --apache certonly --rsa-key-size 4096 --email admin@email.com -d mydomain.com -d sub.mydomain.com

If I understand correctly you are having only one Virtual Host and several different sites that are accessible via different URIs. So in this case you will need a certificate for sub.mydomain.com, the URIs /site1, /site2, etc. do not matter.

More information about the Apache's configuration and how to generate certificates by using of Let's Encrypt you can find within the answers of the questions:

pa4080
  • 29,831
  • The CA that I am using is DigiCert, I was told to purchase a multi-domain SSL based on my situation. But I am not sure how to configure my conf file since all of my websites are using the default one. – Xavier Dec 17 '18 at 01:54