Is possible to change the directories that are created after add a new server?

Hi guys, i want to know if is possible to select where to create the following dirs cgi-bin, homes, logs and Maildir after i create a new Virtual Server under vritualmin.

My main problem is taht i want to get all the sub/alias server and the main server in the same dir, for example /home/username/domains/ /home/username/domains/ … and i cant figure how.

Thanks in advance


Unfortunately, there’s no way around the directory setup you’re seeing… the first domain added in an account uses /home/username/public_html for it’s content, and all additional domains would go into dirs like /home/username/domains/


oh:( cant beliave it.

why virtualmin uses taht way?

if for example i want to admin all my domain names, why i will have the first domain in one folder and the rest in others? :frowning:

I don’t know that there is anything special about the first virtual host that you set up. They all seem to get home directories which includes your domain name minus its TLD. Thus, if your first domain is then its home directory by default is:


and if your second domain is then its default will be:


and of course, beneath these folders will be the ones belonging to the domain such as public_html which is where each web site’s content is stored.

As it transpires, I believe there is a flaw with this methodology. For example, now try adding a domain called You may, or may not, get error messages because a default home directory called /home/virtual1 is already present and in use.

If you get an error, then you have to change your existing home directory. If you are lucky enough not to get an error then you will have a new home directory called:


Either way, I think it could be improved. I don’t like it defaulting to a name that doesn’t include the TLD. And I don’t like having one virtual host with a home directory (and a username) with a TLD and one without. It’s a bit messy (hope the authors of Virtualmin read this).

When I first tried Virtualmin, I got the error condition, hence my search for how to deal with this inconvenient naming method. And finally, the bit you really wanted, how to change your default home directory:

Go to: Server Configuration >> Change Domain name

You will see an option called “Change home directory” which I believe is the feature you want.