I have two servers:
Server1 is a simple Master Server where into DNS I have created domains and subdomains.
Server2 is the real application server where I will have the users applications and webmail.
If I try to create a Virtual Server in Server2, for example always my-domain.tld (to be able to then install in this an application) , an error is returned to me because the domain already exists.
On the other hand, if I try to create a Virtual Server in Server2 corresponding to a subdomain, for example crm.my-domain.tld, Virtualmin creates it without problems although this is already existing because it is present in the DNS.
I have no idea how to resolve the situation.
Thanks in advance for any advice.
If I am reading you correctly, your master virtualmin system already has a reference my-domain.tld, and you are trying to create a second virtual server on a slave with the identical name?
A subdomain (virtualmin subserver) is basically another domain, so there is no conflict.
I am not following what you mean by the subdomain already being present in dns. Where is this the case? My-domain.tld is present, but subdomain won’t be unless it’s been created as a virtual sub server.
No, the Master is with Webmin.
Virtualmin is on the slave and receives the DNS zones from the master.
Therefore it receives both the domain my-domain.tld and the subdomain crm.my-domain.tld.
For the first one it finds an error creating the Virtual Server, while it does not find it creating the second one.
However the Virtualmin Help Desk has already suggested me to disable the DNS, so in the meantime I will try this solution.
Thank you for your reply.
So you have 2 servers setup as essentially ns1 and ns2 and they told you to disable dns? Why?
It sounds to me like you were trying to use the secondary to update the master. Here is a quote from cloud dns…
Slave DNS zone
The Slave zone is a read-only copy of the zone data. Most of the times Slave DNS zones are copies of Master zones. They can also be copies of other Slave zones or Active Directory Zones.
If you try to change a DNS record on a Secondary zone, it can redirect you to another zone with read/write access. By itself, it can’t change it.
One of the primary purposes of a Slave zone is to serve as a backup. When the master zone is down, it can still answer requests for the zone from its copy.
I think you should post their response…otherwise no one can learn from this…it just becomes a useless unresolved topic.
You mentioned that you have a master DNS server with Webmin, and a slave DNS server running Virtualmin.
Does that mean you’re manually creating the DNS records on the master DNS server? And then they’re later transferred to the slave server running Virtualmin?
In that case, you wouldn’t want Virtualmin attempting to create and manage DNS records on the slave server it’s running on. Management would be occurring on the master DNS server running Webmin. Records on the slave server are just copies of what’s on the master server, and we wouldn’t want Virtualmin trying to make changes to those.
You’d probably want to disable the DNS management feature altogether in Virtualmin.
To do that, you can go into System Settings -> Features and Plugins, and there you can disable the “BIND DNS Domain” feature.
Then when you go to create a new Virtual Server, it won’t try to add it’s own DNS records, which would conflict with the ones you’ve already setup on the master DNS server. That will prevent the error “The DNS domain my-domain.tld is already hosted by your DNS server.” which you received.
Alternatively, rather than globally disabling the DNS feature, you could also disable it on a per-domain basis by just unchecking the “BIND DNS” feature when creating the Virtual Server.
Thanks, that confirms what I posted.
Now at least anyone else reading this will understand the roles and functions of master and slave dns.