Strange webserver directory structure

Because subservers can be created as a top level server too, making your points invalid. It will then be and act as a top level server even after you have deleted the main server provided you have given the subserver its own host file and the main domain or just the subdomain is still pointing to your server with an A record (enforcing your last point).
So it’s:
/home/sub.server.tld/public_html
/home/server.tld/public_html

Also you can choose where your main server resides, I believe this is done in the module config or in the server template, change /public_html to /domains/public_html

This is one of the strong points of virtualmin, you can set it up the way you want.

So it’s
/home/server.tld/public_html

Only if you make server.tld a Unix user name.
Unless you really meant /home/joe/public_html/server.tld.

Also you can choose where your main server resides, I believe this is done in the module config
or in the server template, change /public_html to /domains/public_html

Hm… yeah, I could do that.

It would also keep all the auxiliary directories and files (awstats, .awstats-htpasswd, cgi-bin, logs, homes, .stats-htpasswd) out of the home directory.

I still don’t see how to create subservers as toplevel servers.
I don’t have any host files here, bind runs as a caching-only server and relies on external nameservers to resolve the locally hosted domains. (Less interference that way because we’re managing DNS through an external provider.)

This is one of the strong points of virtualmin, you can set it up the way you want.

No, I can’t do away with the “domains” subdirectory :stuck_out_tongue_winking_eye:
(I think it’s hardcoded.)

“Only if you make server.tld a Unix user name. Unless you really meant /home/joe/public_html/server.tld.”
When you create a domain, you can change the administration name to joe if you want, but it doesn’t matter. its then /home/joe/public_html
The main point is that the index.php resides in public_html not /public_html/server.tld/index.php

As for the auxiliary files, I dont know about that as I haven’t tried to switch /public_html to /domains/public_html myself

If you cannot create subservers as top-level domains, I think you have a bug or misconfiguration still. You don’t have the link on top of the screen as in my image I posted above?
Resolving should still work if you have an A record pointed to your server at the registrar or your dns provider.

The “domains” folder is created when you create a subserver or alias belonging to the main server. Else it is not there.

The main point is that the index.php resides in public_html not /public_html/server.tld/index.php

Yep, that was clear.
I was just surprised to see /home/server.tld/public_html . I have Virtualmin set up so that it takes the first part of the domain name as the default user name, and are currently settled for establishing a standard domain such as username.testdomains.hoster.tld so they have somthing to play with.

If you cannot create subservers as top-level domains, I think you have a bug or misconfiguration still. You don’t have the link on top of the screen as in my image I posted above?

I have the link, but I can’t create a top-level server for an existing Virtualmin user account: it’s asking me to enter a new user name, or generates one from the domain name if I don’t enter a name, or bails out with an error if I explicitly enter an existing user name.

As for the auxiliary files, I dont know about that as I haven’t tried to switch /public_html to /domains/public_html myself

Oh, right. That would make moving the top-level server to a different directory pointless.
I’ll try that then.

Resolving should still work if you have an A record pointed to your server at the registrar or your dns provider.

Of course. That’s the registrar, and wholly unaffected by Virtualmin; DNS is not causing any issues here.
I’m trying to set up things in a way that
(a) all domains of a user can be created and deleted independently
(b) all domains of a user reside in the same subdirectory.

I have the link, but I can't create a top-level server for an existing Virtualmin user account: it's asking me to enter a new user name, or generates one from the domain name if I don't enter a name, or bails out with an error if I explicitly enter an existing user name. that sounds wrong to me. Did you submit a ticket for this? (support-link on top of forum)