Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I managed to configure this very nicely under cPanel/WHM, but I am having trouble configuring it under Virtualmin: when I create a new Virtual Server in Virtualmin, I want it to automatically create an Apache with a subdomain of a shared wildcard SSL domain. So for example, if I create a virtual server for, I want two VirtualHosts:

    SSLEngine on
    SSLCertificateFile /path/to/
    SSLCertificateKeyFile //path/to/
    SSLCACertificateFile /path/to/

in cPanel/WHM I was able to do this easily because the template file contained the <VirtualHost> and </VirtualHost> directives. But Virtualmin's template does now. is there any way I can set up Virtualmin to do what I want?

share|improve this question
up vote 0 down vote accepted

I ended up creating a Ruby script which I configured to be run as a hander after any changes are made to a virtual server. The guts of the script are available as an answer to this question, but what it basically does is locate the VirtualHost file for the given domain, find all the directives inside the <VirtualHost> tag, and copy them to a new <Virtualhost> tag configured to use the wildcard cert.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.