Subdomains, cont'd.

Hi all,

subdomains in Virtualmin are still not working properly for me. I mean, actual domains are fine, but if you need only a host in a parent domain, things are different. Although there’s an option to create entries in the parent domain, I did not manage to eventually create such a configuration. Virtualmin still gave me a complete new DNS zone for that host. Disabling the DNS zone feature doesn’t help, either: VM won’t create a DNS zone, but also no entry in the parent domain.

What am I doing wrong? I’m not even sure if my secondary nameserver would accept that domain for backup, so I really do need that “host in parent domain” feature.

And what happens if you create an alias for the parent domain? Will that host be accessible from the alias’ed domains, too?

Lots of questions, I know. Any help is appreciated. Regards,


you need to select the domain you want to have a sub-server for, then create a sub-server as the name of the domain isn’t interesting to virtualmin, but first…in the servers template for subservers - under bind dns domain, you’ll need to activate “Add sub-domain DNS records to parent domain?” to have the dns entries added to the parent servers host file.

if you create an alias then the main domain can be reached through the alias.

That’s what I did. I activated that option and created a domain using the default template. Afterwards I created a sub-server for that domain, but Virtualmin still gave me a complete master zone in DNS named

A bug?

if the option is activated in Default Settings For Sub-Servers
and at creation of the sub-server you have used this template and it is still not working, then there might be a bug on your system.

i can confirm this is working on my system.

make sure you weren’t creating a sub-server as top-level server though, cause that is then made with the default (or any custom) template instead of the Default Settings For Sub-Servers

Filed a bug… maybe the folks can help. Thanks anyway!

Are you running the latest version of Virtualmin (3.67)? I think this one was fixed in that version, but I might be imagining things again (I’ve already had several imaginary moments regarding this particular feature, where I keep thinking Jamie has fixed it).

Here’s what I experience with 3.67 GPL

Utilizing a sub-server template with
"Add sub-domain DNS records to parent domain" set to "Yes"

and creating a new sub-server

if "Setup DNS zone?" is set to "Yes", then a zonefile is properly created, but without a forward glue pair of RRs in the parent zonefile. I offer this as a bug, that the parent zonefile should receive A and NS records for the delegated zone.

if "Setup DNS zone?" is set to "No", then a new zonefile is properly not created, but again the parent zone is not modified at all. I offer this as a related bug, that the parent zonefile should receive an A RR if website created, and an MX RR if email enabled.

The above is also true for creating subdomains, as well as sub-servers.

Perhaps relatedly (or perhaps I should have used a different post), I’m not sure that the creation of an alias virtual server (domain) should result in the creation of file system objects under /home/$parent/domains/ irregardless of whether email or website are enabled for the alias.

@Christian (datenimperator): Same here. I found a solution that worked for me. With Virtualmin GPL version 3.69. Make sure that the sub-server template is configure appropriately. To do so navigate to VIRTUALMIN > SYSTEM SETTINGS > SERVER TEMPLATES
Click on ”EDIT TEMPLATE SECTION” drop down menu located at the top of the page.

Select ”BIND DNS DOMAIN ”option.

Under the section ”ADD SUB-DOMAIN DNS RECORDS TO PARENT DOMAIN?” select YES option.

Click on SAVE button.

Click on SUB-SERVER link.

Then create a new sub-server. Under UNABLE FEATURES section SETUP DNS ZONE must be checked.

Find attached screenshot to clarify.

Note 1: If it doesn’t work wait 15 minutes and go to your website again Sometime your hosting provider needs time to adjust.

Note 2: The sub-server(s) created before setting the sub-server template won’t work. You must create a new sub-server.

My web server has an internal and external IP.
I’ve setup the root domain which resolves and loads correctly.
Then I tried setting up a subdomain or subserver but when I do doesn’t load anymore, instead loads, or vise-versa.
Under webmin -> Apache is configured to resolve to any IP on ports 80 and 443.
However is configured to resolve to the public IP on the same ports.
In Virtualmin -> Website Settings they are both configured to resolve to the public IP on both ports.

Is misconfigured?
Should I back it up, delete it, and try again?..