So, I have a task that I’m trying to set myself up on, and I figured I’d get some help. I’ve been using Virtualmin for about 3 days now and I finally have almost everything set up just how I want it. One thing I noticed was that webmail.domain.tld points to Usermin. I’ve figured out how to change that to, say, Roundcube via the URL redirect under the New Virtual Host template configuration.
I want to instead though keep users within the webmail.domain.tld sub-domain during their interactions with Roundcube.
I’ve been able to have it work by keeping my webmail client in a directory under the top-server. (ie: www.domain.tld/webmail). I have my redirect from webmail.domain.tld pointing to here perfectly fine, and I’m positive I can have it point to webmail.domain.tld if I created a sub-server for it as well.
But having to create a webmail sub-server for each new domain would be tedious. So I figure, why not try and just do it all during the initial creation. I foresee two possible methods of getting this to work. Having the top-server template automatically create the virtual-host for the webmail.domain.tld as well as automatically adding a webmail directory under the home for the new server. (ie. public_html / public_webmail or simply webmail).
Or, a less attractive way is just to have each new top-server create a sub-server at the same time.
Unfortunately, my experience with getting in-depth with apache and such limited, as well as Virtualmin obviously since I’ve had only a few days with it.
Any ideas?
Edit: Just wanted to note I’m using the GPL Virtualmin. As it doesn’t specifically allow me to run the Roundcube installation script, I have one I made to automatically copy, set permissions, and all that fun junk after I make a new virtual host. Just copies all of it into the www.domain.tld/cubemail directory. If I can get one of the above methods to work, I’d instead have it copy over to the webmail.domain.tld.
Update: So, I found out that if I simply add in my Roundcube files to the /etc/skel directory, it basically makes my copy script null and void as it’ll just add the webmail files to any new vhost that’s created. I have it set to where Roundcube will be installed to the home directory along side public_html. All that’s left to do now is figure out how to make a sub-domain automatically create during the top-domain’s creation.