Certificate issue with webmail.tld.domain


I am on Virtualmin GPL 3.79.

I have installed a UCC multi-domain certificate and am facing issues with the webmail rewrite. The certificate works for xyz.com domain and also for admin.xyz.com which opens up the Webmin control panel, however the browser throws up this error with webmail.xyz.com:

The certificate is only valid for *

The Webmin part works but the Usermin does not, with the certificate.
This is the relevant section in apache:

RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.xyz.com
RewriteRule ^(.) https://xyz.com:[port]/ [R]
RewriteCond %{HTTP_HOST} =admin.xyz.com
RewriteRule ^(.
) https://xyz.com:[port]/ [R]

Am I missing something here ?

The issue was resolved.

I was just starting to write out a response, I’m glad to hear you got it working! Thanks for the update.