virtual hosts for usermin and webmin/virtualmin

hey I found the following code, but was wondering if there was a way to adapt it so that all virtual domains are able to access it, not just one. I would like to make it so that virtualmin/webmin and usermin can be accessed via a virtual host and not have to type in the port. I found the following code on another site. could this be adapted to use like a domain variable or something like that?

code:
<VirtualHost default>
ServerName usermin.yourdomain.com
ProxyPass / http://localhost:20000/
ProxyPassReverse / http://localhost:20000/
</VirtualHost>

found at
http://webmin.com/uapache.html for usermin and
http://webmin.com/apache.html for webmin
TIA

Howdy,

There may actually be an easier way – recent versions of Virtualmin set it up such that you can go to either of these URL’s:

admin.domain.com
webmail.domain.com

And it’ll redirect to the control panel or to usermin.

That’s configured within System Settings -> Server Template -> Default Template -> Apache Website. Look for “Redirect webmail.domain” and “Redirect admin.domain”.
-Eric

they are enabled, were enabled by default, but when I go to admin.domainname.com I get a oops, that link appears broken error from google, any ideas?

TIA

I’m not sure I fully understand the error you’re getting – you might need to paste it in here.

But, the "admin.domain.com" will only work if the Virtualmin server is also your DNS server.
-Eric

Hi, my virtualmin server is my DNS server as well, when I type in admin.rooksystems.com I get the following google search instead of the login page:

http://www.google.com/search?q=admin.rooksystems.com&rls=com.microsoft:*&ie=UTF-8&oe=UTF-8&startIndex=&startPage=1

if I type in http://admin.rooksystems.com I get page can not be displayed.

when I type in webmail.rooksystems.com instead of getting usermin, I get some other login page:

https://email.secureserver.net/login.php?domain=webmail.rooksystems.com

TIA

Okay, the problem is that the DNS for admin and webmail aren’t seutp.

Does those work for new domains you add?

It was only a few months back that Virtualmin added that feature. One possibility is that rooksystems.com was added to your system before that feature was around.

As for how to fix it?

If you have the Pro version (I don’t think this is in GPL, though it’s worth looking), you can enable it on the command line:

http://www.virtualmin.com/documentation/id,virtualmin_api_modify_web/

Using something like:

modify_web.pl --domain name rooksystems --webmail

More information on the commands available and how to use them (along with where they’re located) can be found here:

http://www.virtualmin.com/documentation/id,command_line_api/