Modifying user home directory

Good afternoon! Is it possible to change user home directory name to FQDN? I mean, when I am adding virtual server, with domain name "", virtualmin creates home directory, name "/home/example". Is it possible, that Virtualmin will create home directory, called "/home/"? It is very important for me. Thanks.



Yep, that is possible. In fact, I have it set up exactly like you have in mind. :)

You can configure it in the Virtualmin Configuration -> Defaults for new domains : Home subdirectory. Set that to "From template" and the edit box to "$DOM".

(Deleted... Sorry, double-post due to server errors.)

Thanks a lot, thats it)

When I set the Home subdirectory to $DOM I get no such a file or directory errors when creating a new virtual server (I am using custom Apache settings in server templates).

I am trying to create a virtual server to /home/ folder and to have website root at /home/ and access and error logs at home/

Any help would be really appreciated!

What is the error message you are getting exactly?

Performing other Apache configuration ..
.. configuration failed : Failed to copy /etc/php.ini to /home/ : cp: cannot create regular file `/home/': No such file or directory

Setting up scheduled Webalizer reporting ..
.. Webalizer reporting failed! : Failed to open /home/ : No such file or directory at ../ line 1360, line 1.

Setting up AWstats reporting ..
.. AWstats reporting failed! : virtualmin-awstats::feature_setup failed : Failed to open /home/ : No such file or directory at ../ line 1360, line 1.

Thank you!

Does the directory /home/ actually get created at all? Or is it created, but empty?

It seems like the directory gets created, but it's empty.

Weird ... if you su to the domain's user, can you create sub-directories like etc or public_html ?

I have sent you email about the issue.

Ok, I fixed the issue .. there were several configuration problems on your system related to the home directory. Also, the additional templates you had created had invalid default Apache configurations, so I changed the default templates back to those that come with Virtualmin.

What home directory format are you trying to use exactly?

Thank you for your help Jamie!

I would like the home directory to have a subdirectory for each domain, no matter the what the domain type is (server or sub-server). For example:

home/ home/ home/

Was there something fundamentally wrong with the configuration or is it just impossible to set custom subfolders for log files and Webalizer files?

You don't do that layout in Virtualmin, sorry ... sub-servers are always under the parent server's home directory.

To clarify, I would like to also change the default admin user, so then the home folder structure would probably be something like this:

home/adminuser/ home/adminuser/ home adminuser/

Sorry, but that format isn't supported either ..

And in case the "domains" folder is hard coded to sub-servers then I would like the home folder structure to be one of the following:

home/domains/ home/domains/ home/domains/


home/adminuser/domains/ home/adminuser/domains/ home/adminuser/domains/

Or do I have to create a dummy top-level server with no website or any other services (for example: home/adminuser/) and the create all the actual domains as sub-servers (for example: home/adminuser/domains/

You'd have to create a dummy top-level server (perhaps with no website or DNS zone), and then create all your real domains as sub-servers..

How does one exactly configure a top-level server without website, DNS zones and cgi-bin, etc, fcgi-bin, tmp and user folders?

I must admit that this sounds like a limitation for the software, not to be able to set the home folder structure as wanted even there is variables like $HOME and $DOM…

When creating a Virtual Server, you can disable all the features, such as "BIND DNS Domain" and "Apache Website". That won't prevent creation of all the directories, though it will disable many of them.

OK, I managed to create dummy top-lever server.

While creating a sub-server I get an error installing PHPMyAdmin. It complains about the directory.

What is the phpMyAdmin error exactly?