Multiple Domains - Sub-server, Sub-domain

I’ve just purchased the Pro product and have a fundamental question. When I create my first domain owned by “fatbear”, say fatbear.com, it creates the home directory as:

[code:1]/home/fatbear/public_html[/code:1]
When I add an additional domain as a sub-server such as fatbear.net, it creates it as:

[code:1]/home/fatbear/domains/fatbear.net/public_html[/code:1]
And, when I add a sub-domain such as new.fatbear.com, it creates it as:

[code:1]/home/fatbear/public_html/new[/code:1]
I worry about the problems:
[ul][li]If the owner "fatbear" ever decides to let the primary domain fatbear.com lapse and they want to make fatbear.net the primary domain, how is this done?[/li]
[li]Or, if the user wants to keep entirely separate the contents of new.fatbear.com from www.fatbear.com, it seems that the current file path organization is inadequate since one can use the url www.fatbear.com/new to get to the new.fatbear.com content. Also, if the user wants to delete www.fatbear.com, but keep new.fatbear.com, how is that done?[/li][/ul]
Is there a way to keep each of the sub-server domains and sub-domain domains entirely safe from each other (non-overlapping) with all domains treated the same way (no "primary" domain)?

it is not recommended to use subdomains at all in virtualmin.
only use sub servers.
you "should" at least you can make subservers as top level

it will be a complete separate domain/server

As Ronald mentioned, we do not recommend sub-domain accounts under any circumstances (they were added to make former cPanel users more comfortable, but it turned out to be a horrible decision from a usability standpoint for everybody else). The account type should not even appear in a default installation of Virtualmin Professional (it can be enabled in the module configuration, but, again, we don’t recommend it). The sub-domain account type will be removed in the future.

So, did you install Virtualmin via our automated installation script, or manually? (I’m trying to determine if there is a bug that leads to subdomains not being disabled during installation.)

OK, on to your questions:

If the owner "fatbear" ever decides to let the primary domain fatbear.com lapse and they want to make fatbear.net the primary domain, how is this done?

Using the "Move virtual server" form. You can make a sub-server into a standalone parent server easily.

Or, if the user wants to keep entirely separate the contents of new.fatbear.com from www.fatbear.com, it seems that the current file path organization is inadequate since one can use the url www.fatbear.com/new to get to the new.fatbear.com content. Also, if the user wants to delete www.fatbear.com, but keep new.fatbear.com, how is that done?

Do not use sub-domain accounts. They are mislabeled, and broken by design (to match cPanel). We regret their existence every day. :wink:

Use sub-servers. They can be named anything you want, including a sub-domain name of the parent domain. You can even make a sub-domain name be the parent virtual server (but probably shouldn’t as it might be a bit confusing to look at).

Names are of no significance to Virtualmin–so a sub-domain name can be a virtual server, a sub-server, or an alias server. Virtualmin does not care about names.

I suppose one solution in getting unix-path uniformity would be in making the top-level server not actually have any associated domain. And, this would also help out in another way… When customers sign up for service, I would like to give them an empty account. Our operating model is that customers can host an unlimited number of domains since they pay just for disk-space and bandwidth used.

So, I’d really prefer to create an empty user account and let customers add sub-servers as they wish. I’ve already done Administrative Options > Edit Owner Limits > Virtualmin limits for server owner > Maximum allowed virtual servers > Unlimited, so now customers can add sub-servers.

So, how can I create an empty account for clients with no top-level server? Will all added domains be sub-server domains?

what I did first is to clone the default server template and adjust that to certain needs. In fact I have created several of those templates.

1 of them allows subservers to be placed outside the domain and another one does not allow it.

So now I can create a subserver (named as if it where a subdomain) like myclient.mydomain.com for anyone and they can only create subservers in the /home/myclient/domains/domainname/public_html

If I understand your question correctly then I think you find the answers in creating server templates and set permissions as to who can use them

Thanks… I went to System Settings > Server Templates and clicked Create a template from the default settings. Then, I said Yes to the items (a) Initially selected template for top-level servers and, (b) Initially selected template for sub-servers. I checked all of the “For use by” items (top-level, sub-servers, alias servers, and server owners). I named the template “Create a Domain or Subdomain” because that’s something that customer’s would understand. Lastly, for the other templates, I unchecked “For use by Server owners” so that those templates would not show up for customers.

Thanks again!

Thank you for the rapid response… very gratifying!

I installed Virtualmin via the automated installation script onto a Fedora 7 (2.6.23.15-80.fc7) clean system. I did run into one problem. After downloading the script via the wget command provided on my Purchased Products page, I noted (after an initial failure) that the install.sh script had a backslash that needed to be removed:

[code:1]SERIAL=1234567
KEY=ABCDEF1234[/code:1]
Once I removed the backslash, the install script succeeded. Whether that I needed to run the install.sh script twice (first failing, then fixing, then second succeeding) would cause any problems, I don’t know.

I inspected the file /etc/webmin/virtual-server/config and changed the parameter that I think you were referring to from 1 to 0:

[code:1]allow_subdoms=0[/code:1]
I would have preferred to have no distinction between the primary domain and all subsequent domains. That is, I have to factor in special-case code for scripts that I write to look into two places:

[code:1]/home/fatbear/public_html
/home/fatbear/domains/<domainName>/public_html[/code:1]
Moreover, it appears that scripts will need to figure out what the domain name is that corresponds to the /home/fatbear/public_html path. Is there a way to have all domains under the domains directory?

Are there other "release notes" of things similar to this that I should read? So far, the above notwithstanding, I am feeling good about choosing Virutalmin.

Thanks again for your speedy response!