Change top-level virtual server documentroot to match sub-server folder structure

1 post / 0 new
#1 Thu, 04/16/2015 - 16:09
DeathAdder

Change top-level virtual server documentroot to match sub-server folder structure

Hello all, I'm new to the forums. Long time user of PCs and PHP programming, running servers etc, but new to VirutalMin/Webmin (GPL).

My statement/comment/question is, I don't like the way VirutalMin sets up the folder structure for virtual servers. I've read a bunch on this topic, people complaining about the differences between cPanel and VritualMin, but I don't believe my question is covered by those topics (nor do I care for cPanel).

I'd simply like to setup VirutalMin so that the first top-level virtual server is created in the domains sub-folder like sub-servers are created. Does that make sense?

Current top-level:

/home/account
--/awstats
--/cgi-bin
--/etc
--/fcg-bin
--/homes
--/logs
--/Maildir
--/public_html
--/tmp

Current top-level w/ sub (added domains folder):

/home/account
--/awstats
--/cgi-bin
--/domains
----/sub-server.com
------/awstats
------/cgi-bin
------/etc
------/fcgi-bin
------/homes
------/logs
------/public_html
------/tmp
--/etc
--/fcg-bin
--/homes
--/logs
--/Maildir
--/public_html
--/tmp

What's I'd like to see:

/home/account
-/domains
----/top-level.com
------/awstats
------/cgi-bin
------/etc
------/fcgi-bin
------/homes
------/logs
------/public_html
------/tmp
----/sub-server.com
------/awstats
------/cgi-bin
------/etc
------/fcgi-bin
------/homes
------/logs
------/public_html
------/tmp
--/Maildir

This to me makes for a better folder structure for security reasons (keep ppl out of maildir and being able to lock FTP accounts to various domains/subdomains without access to other folders). Perhaps I'm looking at this the wrong way...?

When I attempted to edit the server templates, specifically the Apache section, things started to break. I got errors regarding Web stats cgi-bin folder and AWstats cgi-bin missing, the other various folders were not created under the new documentroot etc etc. Instead of struggling with this and potentially breaking the entire thing, I figured I'd come ask here first.

I also created "accounts" with no services (Web or FTP or Mail etc) and then started creating sub-servers, treating the top-level more as an account holder than a top-level domain. This worked out great, except for those users that only have a single domain - seemed kinda over kill from a management point of view (log in to the account, then log into the domain via drop down). Put, perhaps this is the best way to accomplish my goal.

Thanks -Steve