Top Level Domain vs Sub Domains File Locations

I am rather new to Virtulmin GPL version and I am playing around with a few installations of Virtualmin in our organization to make sure I have a good understanding of it before deployment. One item I am confused of is the file structure. I see that when I make a new Virtual server(top-level Domain) the files are located in home\username\public_html. That seems to make sense but when I create a sub-server(sub-domain), the files are located in \home\username\domains and that doesn’t make sense. I would like one of the following file structures:

Top Domain: abc.com
Sub Domain: xyz.abc.com

Username: Owner

Option 1
File Structure
\home\owner\domains\abc.com
\home\owner\domains\xyz.abc.com\

Option 2
File Structure
\home\owner\public_html\abc.com
\home\owner\public_html\xyz.abc.com\

This is not any type of deal breaker for me but having the top level and then sub domains in a very different path seems strange. I may not know enough to understand this file structure.

Maybe my file structure above is possible and I just don;t know how to make it or do I just need to work with it the way it is?

I would like anyone to explain.

Thanks

Todd

The two structures you suggested are not immediately possible, because sub-servers are meant to share the administrative (owner) user with the parent. And you don’t want the public_html of your sub-server as an actual subdirectory of the parent’s public_html, that would break a lot of things.

The regular structure is /home/PARENT/public_html for the parent, and /home/PARENT/domains/SUBSERVER/public_html. A sub-server does not have to be a sub-domain of the parent! This is only about ownership relationships.

If you really need a structure like you suggested, you can make a dummy parent (leave all features turned off for that, except MySQL if you need that) and put the two domains under that:

Parent: /home/DUMMY
Child 1: /home/DUMMY/domains/abc.com/public_html
Child 2: /home/DUMMY/domains/xyz.abc.com/public_html

Both children would then share the owner user “DUMMY”.

Makes sense and thanks you!