Aliases for Virtual Servers

I manage a non-profit community network with approximately 100 clients. In the past, I've created aliases for clients without any problem. Recently, 2 different aliases failed because the zone file was blank (Webmin -> Servers -> Bind DNS Server, zone file was blank). Once my tech support consultant discovered the problem we were able to copy and paste, then modify the files from the original virtual domain. Has a recent update changed how aliases should be created? Why weren't the files created automatically when the alias was created?

Closed (fixed)


Jamie, I've seen this recently too, and just wrote it off as a fluke. I wasn't able to reproduce it.

But in at least one case, creating an alias in Virtualmin 3.81 didn't generate a BIND .hosts file. It did create the zone entry, but the corresponding hosts file wasn't there. My issue wasn't on CentOS like spool here who reported this bug, I was using Ubuntu 8.04 when I saw the issue.

In the 3.81 release, the way records for alias domains are created changed a bit - they are now copied from the records for the target domain.

In cases where you have seen this, did the target domain have a zone file? If so, is it visible in Virtualmin at Services -> DNS Domain.

The target domains had zone files. That's what we copied, pasted, & revised to make the aliases work. I can't confirm that they were visible in Virtualmin at Services> DNS Domain because we found them via Webmin -> Servers -> Bind DNS Server.

Is this problem repeatable? You could test by creating another alias of the same domain you had a problem aliasing originally, and seeing it gets a zone file or not ..

Hi All, Yes Jamie, this problem is repeatable and I have the same issue with the same version as below: Operating system CentOS Linux 5.5 Webmin version 1.520
Virtualmin version 3.81.gpl GPL

Whenever I create a new alias to any domain, the zone is added in the named.conf file (as a master zone) but the *.hosts file is not generated as it was before... the DNS service will not start if I try to restart or reboot the server I get these types of messages when DNS service starts:

* zone loading master file /var/named/ file not found
* _default/ file not found
* zone loading master file /var/named/ file not found
* _default/ file not found 

I hope there's a quick remedy to this as it's starting to be a manual work editing and copy and pasting everywhere ;) THX for any helpful informations to fix this issue.

EDIT: IMPORTANT! I found out that this error apply when you add an alias with a different domain name than the parent domain name, then the *.hosts file is not created, however if the domain name of the alias is the same as its parent the *.hosts file is not created but there's a dns record added on the parent domain zone.

I hope the above EDIT is useful for Jamie to trace the problem.

So in the case where this fails, is the alias domain a sub-domain of the orignal?

For example, is the target and the alias ?

In our case, the alias is not a sub-domain. All our clients begin as When clients choose to register their own domain names, I create an alias of the original account for whatever that domain name happens to be. To use your example, the target is and the alias would be As I said in my original post, I've done it several times in the past and only recently had problems.

I agree with nousa, I hope this gets fixed because manually editing the files is more prone to error and tedious.

I have been unable to trigger this problem during testing.

If you can repeat this consistently for a specific target domain, I could perhaps login to your system and see what is going wrong?

Jamie, here is my situation:

1) it works fine if I choose to add an alias to a top level domain with the same domain name suffix (it add the appropriate records in the top level dns zone) as per example below, and that's working perfectly for me:

top level domain =

alias to the top level domain =

2) it does not create the *.hosts file if I add an alias with a different domain suffix name than the top level domain, as per example below:

top level domain =

alias to the top level domain =

bear in mind that in option (2) I have already a top level domain called on the same virtualmin server but due to some policy I have to have as an alias to website.

in option (2) like I wrote before, it create the alias in the virtualmin webgui console, but in "virtualmin --> aliased domain --> servcies --> DNS domain" there are no (empty) DNS records, when I try to restart the DNS service, the DNS service fail to start with the error I pasted above (post #5) so I have have to create manually the file through ssh console to get the DNS service to start in my virtualmin server.

Does this make it more clear Jamie? If you have any question, I'll be glad to try answer it ASAP. Regards, Anis

nousa - in case 2, are , and all owned by the same Virtualmin user?

While looking into this, I found a bug that could trigger if the alias is a sub-domain of another existing domain with the same owner. If you like, I can send you a fixed version of Virtualmin to test with. Just let me know which Linux distribution you are running on, and if you have the GPL or pro version.

Jamie, no, beceause is an alias domain of so these two domains are owned by the user "support" (reading it from the files and folder owners through ssh) is owned by "anotherdomain" user (and a group called "anotherdomain" as well)

the infrastructure is live production, so if the fix will not get me into a trouble then I'll be happy to test (you will have to let me know as well what are the steps to follow in a clear manner :) )

I'm using CentOS Linux 5.5 , Webmin version 1.520 and Virtualmin version 3.81.gpl GPL

Regards, Anis

I've sent you an updated RPM - let me know how it goes.

Thanks Jamie,
I applied the rpm file you sent me, it creates the *.hosts file but this file is empty and it include only the line below:

$ttl 38400

so it's missing all the required minimal records (SOA, TTL's, NS and the A record for that Alias), when restarting the named service on the ssh console I get the error below:

zone has no NS records
_default/ bad zone

I believe this is a small tweak that can be easily fixed ;)

Thanks, Anis for picking up on my original posting. I'm in over my head and anything I would try to test would be a disaster. I'm looking forward to a solution that we can all install with the next upgrade.


Thanks, that is useful information. Anis - I have sent you a new update that should fix the problem this time.

This is it, I've tested it on my live environment with few different aliases for few top level domains (all possibilities that failed before) as well as checked the logs after restarting the DNS services and it work perfectly now, all is clean after this last update you sent me.
IMHO we can close this ticket and tag it as resolved so you can push this updated package in the next update release.
Thank you very much for your quick reaction and keep up the good work! bravo!


Cool .. we plan to release Virtualmin 3.82 this week, which will include the fix.

Automatically closed -- issue fixed for 2 weeks with no activity.