Sunday, May 31, 2020

Domain serving SSL certificate of a subdomain

Today one of my sites was serving a SSL certificate of a subdomain instead of the domain's one, after configuring the SSL certificate for the subdomain with certbot for Apache.

It took me some hours of investigating and tries.

The problem is that certbot changed the domain.conf file in /etc/apache2/sites-available folder to serve the subdomain's SSL certificate. Editing the file and reloading Apache solved it.