Sharing an SSL with alias domains

Hi all,

I’ve got a shiny new VirtualMin install running on Centos 7. Right now I’m trying to get “preview urls” working as described in the FAQ here:
https://www.virtualmin.com/documentation/web/faq

I’ve bought a new domain name (http://mydomain.tld) and I’ve got Virtualmin configured to setup a new alias domain foe each new client (http://username.mydomain.tld).

I’ve created a top level virtual server for mydomain.tld and added a wildcard SSL certifcate (*.mydomain.tld), which is working fine also.

So far so good. I can hit https://mydomain.tld and it has a valid SSL.

Now I want to use subdomains of mydomain.tld as staging URLs. Let’s say my client’s website is hosted at myclient.com. My staging / preview URL is myclient.mydomain.tld.

What I’m stuck on is allowing the alias servers to use the correct SSL. When I hit https://myclient.mydomain.tld it’s pointed at the server correctly but the certificate is not valid because it’s using the myclient.com certificate.

How do I make the myclient.mydomain.tld use the wildcard *.mydomain.tld cert?
… or is there a better way to set this up?

Many thanks!
Chris

OS: CentOS Linux 7.6.1810
Webmin: 1.900
Virtualmin: 6.06

This just magically started working…I’ll take the win! Maybe it needed a restart or something.

Actually I worked out why it started working - I was fooling about with Let’s Encrypt and that’s the certificate it’s sending back.

My original question stands - is there any way to make the virtual server automagically pick up a global certificate?