DNS setup of sub-domain does not work as documented.

I have an existing server current hosting about 75 domains that I setup and completely configured manually. Everything works as expected and as required and my DNS, email & apache server configs are very clean. Some other things are a bit messy since some things were adding in a hurry (mostly home & domain directories of clients with multiple domains).

I am trying to set up a new server (larger processor, hard drive, more RAM, etc). I was hoping to use virtualmin to add the domains to new server to keep things more organized and also allow clients to add their own domains, add/change emails, etc. After the new server is set up with the domains I am planning to copy over the data directories to the new locations.

I have several users with multiple domains like: site.com gallery.site.com site.net site.info gallery.site.info domain.com blog.domain.com domain.net blog.domain.net

In some situations these similar domain names are just aliases, but in other situations these actually need to be separate domains, all for the SAME USER.

I have found that virtualmin is unable to setup some domains as they currently exist since virtualmin does not work as documented (at least not in the docs that I can find).

To make things simpler, I attempted to set up the following: Main site: example.tld website & email Second site: example2.tld website & email Sub domain: gallery.example2.tld web site & database (email is NOT required for the sub-domain since it is handled by example2.tld)

I attempted to set this up on a freshly installed system: FreeBSD 8.2-STABLE #0: Mon Apr 11 11:52:41 PDT 2011 Version 3.84.gpl, master admin mode

Steps I followed are as follows: Prep I verified that Server Templates > Default Template > BIND DSN domain: Add sub-domain the DNS records to parent domain YES Add SPF DNS record? YES, with server’s IP address Create a template from default settings Default Settings (Copy) (I found some postings on blogs that said the above steps were required although I could find NO virtualmin documentation regarding this.)

Step #1 Add new virtual server, owned by Domain name: example.tld Server configuration temple: Default settings Account Plan Default plan (I left everything else at the defaults) DNS setup as expected

Step #2 Add new virtual server, owned by example Domain name: example2.tld Server configuration temple: Default settings (Copy) (I left everything else at the defaults) DNS setup as expected

Step #3 Add new virtual server, owned by example Domain name: gallery.example2.tld Server configuration temple: Default settings (Copy) (I left everything else at the defaults) VIRTUALMIN DOES NOT WORK AS DOCUMENTED!

A separate zone file is created for gallery.example2.tld when one line should be added to the zone file for example2.tld

I have search for documentation on this but have been unable to find any (although I have found postings on unofficial blogs). I have tried numerous different combinations of settings but always get the same undesirable results.

If I try and add a sub-domain (photo.example.tld) to the main server (example.tld) virtual does work correctly and adds the DNS configs to example.tld and does NOT create a separate zone file.

I have found a few other bugs that I can live with but I feel that this DNS issue is required. Since the server is brand new and is currently only being used for development I am even considering wiping out the hard drive and installing fresh (again) to make sure I didn’t accidentally change an obscure setting somewhere.

Status: 
Active

Comments

Well, FreeBSD isn't officially supported on Virtualmin GPL, so it is certainly possible you could run into a few issues. The supported distros can be found here:

http://www.virtualmin.com/os-support.html

However, regarding the issues you brought up --

A separate zone file is created for gallery.example2.tld when one line should be added to the zone file for example2.tld

Yeah, by default, it would use a separate zone file for every Virtual Server and Sub-Server. But after tweaking the setting you found in the Server Templates, it should no longer create that new zone file.

Since that's not the behavior you're seeing, you may have found a bug, we'll need to dig into that a bit.

This is actually a missing feature in Virtualmin currently - sub-domain DNS records are only created in the parent domain if the parent domain is also the primary domain for the user (example.tld in your example above).

Right now the only work-around is to not enable the DNS feature for these sub-domains. Then after creation, select the top-level domain example.tld from the left menu, go to Services -> DNS Records, and add an Address record for the sub-domain with the correct IP.

Is there anything that I can do you help you trouble shoot this?

It is a clean system so if you want I can send configuration backup files. Just let me know what you need.

Sorry for the delay in responding - I forgot about this bug!

Troubleshooting isn't really needed, as the cause of this problem is actually a missing capability in Virtualmin. I plan to fix it in the next release though.