This is trivial to setup, but it’s not click-a-button automatic. It’s a good idea though. I’ll add a wish and get it into the default install in the not-too-distant future (it’s just a regex AliasMatch thing…no need for any support in Virtualmin, actually).
In the meantime, I believe you’d do the following to set it up manually:
Pick your “default” virtual server (virtualmin.domain.com in your example above) in the Apache Webserver module. It’s, obviously, gotta be one that has SSL setup for it.
Edit the "Aliases and Redirects" for this virtual server.
Add a "Regexp document directory aliases" something like this:
^/secure/(.)/(.) /home/$1/public_html/$2
I’m not actually sure about that regex–if .* is greedy in an AliasMatch, that won’t work. I’ll poke at this a bit more sometime today and get back to this thread when I have a more definitive answer. It’ll also need a similar ScriptAliasMatch rule to have working CGI.
A ProxyPass rule might also be superior…it would handle the CGI problem with less trouble, I think. In either case, we’re talking about two lines in the Apache configuration file, rather than anything that would need to be done for every new domain.
Others here have probably setup something similar, and maybe they’ll chime in with the way they solved it.