How do I make domains available before the DNS changes are made at the registrar?
- or -
How do I make a users website available at "http://www.mydomain.tld/~username"?
Virtualmin supports a few of methods of "previewing" a site before the DNS stuff is pointing to the right place.
A quick way to do this is to log into Virtualmin, and click Services -> Preview Website. When you click that, Virtualmin will retrieve the website, and you will be able to navigate it from within the control panel GUI.
Another method, and the way we'd recommend, is to setup an alias so that your customer could access their site using http://username.mydomain.tld. You can do that by going into System Settings -> Server Templates -> Default Template -> Virtual Server Creation, and adding your primary domain in "Automatically create alias domain". This makes it so that any new Virtual Server created will have not only the domain you setup, but also an alias your customer can use before the DNS is pointing to your server.
Some have asked why Virtualmin doesn't use the UserDir (http://www.mydomain.com/~username) feature they've seen used in other virtual host administrative tools. This method of access is discouraged by the Apache developers as it is potentially a security issue, particularly in shared virtual hosting environments where Virtualmin is usually used. How large a security issue is debatable and depends on the environment, but we trust the Apache folks to know their own software and what is and isn't a good default, so we don't enable it by default. Those issues are increased exponentially by allowing CGI/PHP scripts to run in this way, and we strongly discourage use of UserDir with executable applications, as it introduces serious security problems.
However, you can use this mode, if you wish.
To switch your Virtualmin server to behaving the way you're used to, you just need to turn it on in Apache. Here's how:
Browse to the Apache Webmin module.
Click on the Default virtual server (just be sure you know what your default Domain is so you can point folks to the right place).
Click on the Automatic Virtual Hosts icon.
Switch the radio button by Automatic virtual host root to the one beside the empty field, and fill in the field with, /home/%0/public_html. Note that if you've configured Virtualmin to create domains with a different path convention (e.g. "/home/a/abc") things get more complicated and you'll need to construct a path using the variables documented here:
How can I use Roundcube as the default webmail program instead of Usermin?
It's possible to use Roundcube as the default webmail program, in place of Usermin. To do that, our recommendation is to install Roundcube into one specific Virtual Server, and then update the webmail redirects so that going to webmail.domain.tld on any domain hosted on your server will redirect to your Roundcube installation.
The first step would be to choose a Virtual Server that should host Roundcube, and to install it. If you have Virtualmin Pro, you can use the Install Script to perform the installation. If you have Virtualmin GPL, you can download Roundcube from roundcube.net, and perform the installation manually using the instructions on their site.
Once Roundcube is working -- the next step is to setup the webmail redirects to point to your installation. To do that, log into Virtualmin, and browse to System Settings -> Server Templates -> Default Settings -> Apache Website. Scroll down, and look for the setting "URL for webmail redirect". You'll want to set that to the URL for which you've installed RoundCube (such as http://roundcube.your_domain.tld).
Making the above update will only change new Virtual Servers. To update existing Virtual Servers with your new webmail redirect, you would need to use the Virtualmin command line tools. First, run this command from the command line as root to disable the webmail redirect for all Virtual Servers:
virtualmin modify-web --no-webmail --all-domains
Then, you can re-enable the webmail redirect (but with the new settings) by using this command:
virtualmin modify-web --webmail --all-domains
After you complete the above, going to webmail.domain.tld for any domain hosted on your server should then take the user to your central Roundcube installation.
FTP Service isn't working
If you're able to log into FTP, but you receive an error like this when trying to change directories or list files:
Connection timed out Error: Failed to retrieve directory listing
That may mean you need to load the FTP connection tracking module on your server.
You can do that by running this command as root: