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

4 posts / 0 new
Last post
#1 Wed, 06/16/2010 - 21:54
samsagaz

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/domain1.com /home/username/domains/domain2.com .... and i cant figure how.

Thanks in advance

Wed, 06/16/2010 - 22:07
andreychek

Howdy,

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/domain1.com/public_html.

-Eric

Wed, 06/16/2010 - 22:50
samsagaz

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? :(

Thu, 06/17/2010 - 20:42 (Reply to #3)
kevanharding

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 virtual1.com then its home directory by default is:
home/virtual1

and if your second domain is virtual2.com then its default will be:
home/virtual2

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 virtual1.co.uk. 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:
home/virtual1.co.uk

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.

Regards Mark

Topic locked