Can a Sub-Server Be Created at Top Level?

SYSTEM INFORMATION
OS type and version Rocky 8.x
Webmin version Current
Virtualmin version Current
Related packages SUGGESTED

I’m pondering a migration of a fourth cPanel server on which two of the “subdomains” were created as top-level servers.

The reason was because the two sites weren’t https (it was rather unusual then for informational parts of sites to be secured), but the two subdomains were. They contained the contact forms and other interactive stuff where personal information was requested. They also needed dedicated IP addresses because that’s how it was done back then.

Each subdomain was created as secure.parentdomain.com.

When I make the backups in cPanel, I’m assuming that those two domains will be created as top-level accounts. Can they be migrated into Virtualmin the same way, or will that cause Virtualmin to vomit with gusto?

Or perhaps can they be migrated as sub-servers of their parents after the parents are migrated?

The other option would be to manually create secure.domain1.tld and secure.doman2.tld and manually update the files into them. But then I’d have to manually fix some database stuff, as well.

Another possibility would be to eliminate the two secure subdomains and place those pages on the main sites, with the appropriate redirects so any bookmarked links would still work. I don’t care about redirect penalties on contact forms.

The current plan is to do an in-place upgrade to preserve the immaculate IP addresses, which also means that there will be downtime. I’m looking for the most-efficient way to migrate these sites to minimize it.

Thanks,

Richard

You can convert a sub-server into a top-level domain.

I’m not sure I understand what you’re describing, but I’ll mention the following two things that may be useful to keep in mind when migrating from cPanel:

  1. Subdomains are just names in Virtualmin. It doesn’t care. A name is a name. sub.domain.tld can be a top-level domain, or it can be a sub-server of domain.tld or it can be a sub-server of some other domain.tld. It doesn’t matter, it’s a name.
  2. Sub-servers are about ownership in Virtualmin. That’s it. A sub-server is owned by some other top-level domain account and lives in a subdirectory within that user’s home (this is a compromise, but it’s to ease administration, permissions, and backups). A subdomain has no technical reason to be a sub-server, and there is no limit on what you can name a sub-server (unless you impose one with configuration).
1 Like

Thanks, Joe.

The current situation is that the server has five top-level accounts. The server shares the domain name of the most-important account. (This does not have to be the case on the replacement server as I have acquired the .net variant of the domain name.)

One of the accounts has multiple subdomains under it; plus secure as a separate top-level account

Another account has no subdomains, but it does have secure as a separate top-level account.

So…

server1.domain1.tld
    domain1.tld
        sub1.domain1.tld, sub2.domain1.tld, etc.
    secure.domain1.tld
    domain2.tld 
    secure.domain2.tld
    domain3.tld

From your explanation, my understanding is that I can:

  1. Install the OS and Virtualmin
  2. Make any modifications I want (PHP versions and so forth)
  3. NOT create the virtual server domain1.tld
  4. Migrate the backups into Virtualmin, starting with domain1.tld.

There will be no conflict migrating the two secure accounts as top-level virtual servers, as they presently exist on the cPanel server, if that’s how I decide to do it.

Richard

I’m not sure how the cPanel migration tool handles this. But, suspect you’ll get all of those domains under server1 and sub-servers. Which you can then convert to top-level servers with their own accounts, afterward.

That should be relatively painless, I’d think/hope, if a little bit roundabout. But, I can’t think of how Virtualmin could reasonably handle importing them otherwise…it tries to map the way cPanel thinks about domains/subdomains and ownership to the way Virtualmin thinks about those things, and they don’t always exactly overlap, but clearly all those other domains are under server1, so that’s what Virtualmin is going to do.

But, what you do with it after that is up to you. I think. It may be possible to split them up at restore time, but I kinda doubt it (but I have very little experience with cPanel migrations myself).

Okay, thanks.

I don’t especially care whether they’re top-level or subs, by the way. But top-level is the way they exist now, so that’s where I’m starting.

Another option would be to merge them on the losing server pre-migration. I don’t know if cPanel has a way to do that or if I’d have to do it manually, but it would be simple enough (albeit tedious) to do manually.

Only one secure has any database calls, and it’s to databases owned by the parent domain using the parent domain’s credentials. So the MySQL user/password combinations already exist on the parent domain. The other secure is just a contact form and a mailing script, so that would be quick and easy.

That may make for a cleaner migration.

Or… I can migrate the parent domains but not the two secures. Then create them as subs of the parent domains in Virtualmin, and upload the files into the subs. Since the databases of the one with database calls are owned by the parent domain anyway, they don’t need to be recreated on the subs. They should be migrated over with the parent domain.

I also have to search for a solution to another problem involving the message filters. I mean that literally: I actually came up with a fix, but I have to search for it. It’s probably posted on here somewhere.

Thanks again,

Richard