Hi,
I’ve installed new virtual server and then subserver. I have to mention I have IPv6 also on this server. DNS zones (as features on them) are disabled. I’ve created sucessfully Lets Encrypt certificates for them. And… when I try to open webpage there is SSL error because it turned out Apache gives default (first) virtual hosts certificate instead of certs for these new domains. What is going on ? please help.
This sounds like a variation of “the wrong site shows up”. I suspect if you click through the warnings, you’ll actually get the wrong site, and not just the wrong cert for the site.
IPv6 complexifies this a little bit, but it’s always the same problem: The site Apache thinks it should serve based on the information it has is different from the site you think it should serve, and that comes down to the deranged way Apache decides on the “right” site. Name is the least important factor, and the most specific site that matches is the one it serves (so, if you have some * VirtualHosts and some address-based VirtualHosts, Apache really wants to serve the IP-based sites first…and IPv6 addresses are also preferred).
Ok so “Default for new domains” will work probably for new virtual hosts. Thank you.
But how to change it for current virtual hosts ?
System Settings → Virtualmin Config → Network Settings and manually pointing out of IPs v4 and v6 didn’t fixed Apache config…