Subdomains and DNS

3 posts / 0 new
Last post
#1 Sat, 10/16/2010 - 01:29
mcsteve

Subdomains and DNS

I'm not sure if what I want to do is even possible, and I'm almost definitely doing it wrong, but here goes:

I would like to be able to create virtual servers in Virtualmin which are subdomains of my actual domain, which is not handled by Virtualmin (should it be? Might make my life easier...) I'd like to use the subdomains for demo sites and maybe eventually some free accounts.

Basically, right now my hosting server is also my company web server. The website and BIND zone for my domain are handled outside of Virtualmin. Virtualmin will happily let me create a virtual server with the domain subdomain.mydomain.com, but it disregards the "Add sub-domain DNS records to parent domain" setting, and creates a new zone.

This doesn't work for me, because my slave DNS servers, provided by my VPS provider, won't accept the subdomain zones.

I assume Virtualmin is disregarding that setting either because the "parent domain" isn't managed by Virtualmin, or because of a bug. Either way, what's my best course of action here? I can probably have Virutalmin handle my main website, but when I buy Pro, I'll be using a license for my own site, which seems wasteful.

So, any advice?

Wed, 10/20/2010 - 10:12
Locutus

You are correct with the assumption that Virtualmin "ignores" the "parent domain" because it is not managed by VM. This isn't a bug. "Parent server" here always refers to "VM virtual server", independent on whatever the DNS domain happens to be.

So, I don't think there is a way to have VM automatically add the data for your new subdomain to the "parent domain". Thing is: it MUST not do so! VM must not fiddle with zone files that are not under its management.

What might work is if you add a nameserver delegation to the zone file of mydomain.com, like so:

subdomain.mydomain.com IN NS ns.mydomain.com

assuming the hostname of the machine the whole thing runs on is ns.mydomain.com. Otherwise replace the name with the appropriate hostname.

Normally, this method is used for delegating subdomains to a different nameserver machine, but it should be possible to also do this if the delegated machine is the same server.

Wed, 10/20/2010 - 10:15
Locutus

Additional thought: This still won't solve the problem of your VPS provider not accepting the new zones of course... It should work in terms of making your new zones "known" to the outside world, but you won't have a backup DNS server then. For "demo sites" and "free accounts" that might be acceptable though. :)

Topic locked