I don’t know whether I’m analyzing the problem correctly, so let me just describe, what happens:
I have a hosted site with one IP. I bought a commercial certificate (DigiCert) I established this certificate in /etc/apache2/certs/ and gave the main site a http Redirect permanent that redirects every http://www.mydomain.tld/ to https://www.mydomain.tld/.
I’m getting the SANs that I entered when requesting the letsencrypt certificate. All fine so far.
But, when I open the site URL https://mydomain.tld/ in a browser (FF), I’m getting the yellow alarm window of Firefox, saying that the site may have an insecure certificate.
When I open the details, I see that it is the letsencrypt certificate with the common name
mydomain.tld
But for this domain I have provided the DigiCert Certificate.
It looks like you replaced the digicert certificate instead of adding to it.
You have three options:
Create three virtualhosts for the three sets of domains, one for each certificate (one digicert and two let’s encrypt).
Add all the certificates to the same virtualhost, with all the domains. (if your webserver supports it – apache only does in quite modern versions)
Ignore the digicert certificate and expand a let’s encrypt certificate to include all of the domains. (This is the only option that works without SNI, but it doesn’t matter too much)
$ apachectl -S
VirtualHost configuration:
*:80 is a NameVirtualHost
default server mail.werkwelt.de (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost mail.werkwelt.de (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost www.buchabsatz.de (/etc/apache2/sites-enabled/de.buchabsatz.www:1)
alias buchabsatz.de
alias web.buchabsatz.de
port 80 namevhost www.urquell.de (/etc/apache2/sites-enabled/de.urquell.www:1)
alias urquell.de
port 80 namevhost www.werkwelt.de (/etc/apache2/sites-enabled/de.werkwelt.www:1)
alias werkwelt.de
port 80 namevhost www.lindenthaler.eu (/etc/apache2/sites-enabled/eu.lindenthaler.www:1)
alias lindenthaler.eu
alias web.lindenthaler.eu
*:443 is a NameVirtualHost
default server www.buchabsatz.de (/etc/apache2/sites-enabled/de.buchabsatz.www:9)
port 443 namevhost www.buchabsatz.de (/etc/apache2/sites-enabled/de.buchabsatz.www:9)
alias buchabsatz.de
alias web.buchabsatz.de
port 443 namevhost www.urquell.de (/etc/apache2/sites-enabled/de.urquell.www:7)
alias urquell.de
alias web.urquell.de
port 443 namevhost www.werkwelt.de (/etc/apache2/sites-enabled/de.werkwelt.www:7)
port 443 namevhost www.lindenthaler.eu (/etc/apache2/sites-enabled/eu.lindenthaler.www:7)
alias lindenthaler.eu
alias web.lindenthaler.eu
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex ssl-stapling: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/var/lock/apache2" mechanism=default
Mutex mpm-accept: using_defaults
Mutex watchdog-callback: using_defaults
PidFile: "/var/run/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33
Group: name="www-data" id=33
$
# Include the virtual host configurations:
Include sites-enabled/
in my /etc/apache2/apache2.conf so files don’t need to be named .conf there.
You say, my port 80 vHost list doesn’t match my port 443 list.
Well, I wasn’t aware that the order in which the sites are loaded, plays a role.
I took care that the default site got loaded first and now it seems to look better.
$ apachectl -S
VirtualHost configuration:
*:80 is a NameVirtualHost
default server www.werkwelt.de (/etc/apache2/sites-enabled/000-de.werkwelt.de:1)
port 80 namevhost www.werkwelt.de (/etc/apache2/sites-enabled/000-de.werkwelt.de:1)
alias werkwelt.de
port 80 namevhost www.buchabsatz.de (/etc/apache2/sites-enabled/de.buchabsatz.www:1)
alias buchabsatz.de
alias web.buchabsatz.de
port 80 namevhost www.urquell.de (/etc/apache2/sites-enabled/de.urquell.www:1)
alias urquell.de
port 80 namevhost www.lindenthaler.eu (/etc/apache2/sites-enabled/eu.lindenthaler.www:1)
alias lindenthaler.eu
alias web.lindenthaler.eu
*:443 is a NameVirtualHost
default server www.werkwelt.de (/etc/apache2/sites-enabled/000-de.werkwelt.de:7)
port 443 namevhost www.werkwelt.de (/etc/apache2/sites-enabled/000-de.werkwelt.de:7)
port 443 namevhost www.buchabsatz.de (/etc/apache2/sites-enabled/de.buchabsatz.www:9)
alias buchabsatz.de
alias web.buchabsatz.de
port 443 namevhost www.urquell.de (/etc/apache2/sites-enabled/de.urquell.www:7)
alias urquell.de
alias web.urquell.de
port 443 namevhost www.lindenthaler.eu (/etc/apache2/sites-enabled/eu.lindenthaler.www:7)
alias lindenthaler.eu
alias web.lindenthaler.eu
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex default: dir="/var/lock/apache2" mechanism=default
Mutex mpm-accept: using_defaults
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex ssl-stapling: using_defaults
Mutex ssl-cache: using_defaults
PidFile: "/var/run/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name="www-data" id=33
Group: name="www-data" id=33