Subdomains dont work

5 posts / 0 new
Last post
#1 Wed, 05/29/2019 - 08:22
david83

Subdomains dont work

Hello, I use a domain bossmeyer.de as a virtual server in webmin. This works fine. I have also created a subdomain as a virtual server so tester.bossmeyer.de.

bossmeyer.de works great. The subdomain will not be resolved even though all zones are present.

Can someone tell me where the error is?

Using Bind.

Wed, 05/29/2019 - 15:56
adamjedgar

Hi David, I dont pretend to know what level of experience you have...quite likely more than me. I tend to avoid using Bind as a SOA nameserver on my own system...so you probably have more experience than me with in that area)

However, here is the process i go through on a brand new Virtualmin VPS to do this...and i have done it this way for 3 years many many dozens of times.

Firstly...I do not use Virtualmin as a nameserver...my registrar provides free dns hosting so the SOA is with my registrar using their own nameservers. Therefore in virtualmin template, i disable the use of bind dns for domain resolution (note i am not turning bind off in webmin, just not setting virtualmin>virtual servers to use it for domain SOA) I find that if i completely disable bind, i have problems with postfix (which is probably something i do wrong?). So with the above in mind on a new system...

after initial install and going through the post installation wizard in virtualmin...

  1. Virtualmin>Create Virtual Server (New server type = top level server)
  • I leave everything to begin with as the default (including server config template and account plan as "default")

  • Enabled features>"Setup DNS Zone" (i deselect this option because my SOA/dns/ nameservers are provided by my registrar free)

  • Enabled Features> "setup SSL Website too" (I select this option so virtualmin will add a self signed ssl for me)

    After primary Virtual Server has been created...

  1. Virtualmin>Create Virtual Server (this time choose "Sub-Server" type)
  • add domain name in New Virtual Server Details

  • Server configuration template> "Settings for Sub Servers" (normally selected by default)

  • I leave everything as default (except next line)

  • again uncheck Enabled Features>"Setup DNS Zone"

in virtualmin, both domains are accessed under the primary virtual servers own tab (ie sub server is nested under primary virtual server)

So if i then search in virtualmin>file manager i have the following...(where virtual server is called "adam" and sub domain is called "little.adam")

home/adam/public_html (this is the location of my primary domain or virtual server)

home/adam/domains/little.adam/public_html (this is the location of my subdomain or sub server)

  • btw for me this additional directory "domains" does not show up in file manager until after i have created the virtual sub server!

doing the above works for me without any additional configuration on a brand new Virtualmin system (obviously after allowing time for dns propogation to take place)

I use mxtoolbox.com to check dns propogation. i also use this tool for creating spf and DMARC records (although that functionality in this website isnt obvious from its home page...i google search mxtoolbox dmarc to get to the creator for that)

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Mon, 06/03/2019 - 04:05
david83

Hello adamjedgar, Thank you for your answer. I use the bind server under Webmin. I want to be able to change the zone entries directly into virtualmin. Thus, the solution to use the external nameserver is out of the question. I will continue to test and try if I can find a solution.

Mon, 06/03/2019 - 09:13
andreychek

Howdy,

Hmm, when using intodns.com to get a DNS report on the domain "bossmeyer.de", it appears that the nameservers for that domain are set to a third party server -- b.ns14.net, c.ns14.net, and d.ns14.net.

That means all DNS lookups would be occurring at that third party server, and not using your Virtualmin server.

My guess is that at some point you had added your domain at that third party DNS server at some point, but never added that sub-domain.

You could always add records for your sub-domain at that third party provider, though it sounds like that's not your preference.

If you want to use your Virtualmin server as the nameserver, there is some info on setting that up here:

https://www.virtualmin.com/documentation/dns/faq#toc-how-do-i-setup-name...

Mon, 06/03/2019 - 23:09
adamjedgar

Also don't forget, some registrars will not allow just 1 single nameserver. IE that would mean you cant just have one server...you need 2 of them. What I usually do in this case is:

  1. use the main webserver as one nameserver

  2. purchase a cheap low resource system to use as the secondary nameserver (for example a Vultr VPS for $5 month)

So if you want to use virtualmin to control your DNS SOA, you actually need one of the following:

  1. a second ip address for your virtualmin system -so it has two (I have no experience with this method...got that from another forum a while back)

  2. A second Virtualmin Webserver to act as the secondary name server.

oh I almost forgot...on the second low resource system, you don't need the full blown virtualmin install. Its only for running bind dns

Also, I did a SOA lookup on your server and its not registered as a nameserver (maybe I made a mistake)....I have rushed over this whilst eating my lunch, so please forgive if im offtopic…

don't forget to register your nameserver with your registrar (glue records)...otherwise it is effectively not on the dns network as a recognised nameserver. If all you have done at registrar is just point A record at Virtualmin, obviously your primary domain will show up, however, none of the other virtual servers will because they are not using external SOA...so this is not enough...you need glue records for the primary nameserver (your virtualmin system) at your registrar as well.

https://wiki.hetzner.de/index.php/Vanity_DNS

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Topic locked