pmepost
By:
pmepost

www. does not work for virtual servers (virtualmin), only http:// will work

January 4, 2015 1.8k views

I have set up Ubuntu Server 14.04 droplet with virtualmin. I am able to create virtual servers that is reachable (firefox) at their own domainnames using http://virtualdomainnamehere.tld, but if I try www.virtualdomainnamehere.tld I get "server not found" These virtual domainnames are registered at godaddy.

On my MAIN droplet domain I added the CNAME www @, and for this domain using www.maindomain.tld works ok, but not on the virtual domains set up inside Virtualmin.

Do I have to add each virtual servers domainname in the DO droplet DNS area and add a CNAME entry for each of them, or how do I fix this?

1 Answer

What nameservers are you using? If ns1-3.digitalocean.com, you will need to add your DNS records DigitalOcean's DNS control panel. In that case, you also don't need to bother adding them to Virtualmin as you are not using its DNS nameservers.

  • Hello kamaln7, and thank you for answering.

    Funny thing is, everything (exerpt the www-thing) worked perfectly well yesterday when I set this up, and earlier today, but suddenly none of the virtual domains works any longer (not at all), and I have not changed anything since yesterday, so scratch my head.

    Anyway, here is the setup I created yesterday, which worked but no longer works.

    IN MY GODADDY ACCOUNT.
    Godaddy is registrar for my main droplet domainname, which I for this purpose describe as:

    maindropletdomain.tld

    This domain I have configured by adding 3 hostnames:
    ns1 --> 173.245.58.51 (ipadress of ns1.digitalocean.com)
    ns2 --> 173.245.59.41 (ipadress of ns2.digitalocean.com)
    ns3 --> 198.41.222.173 (ipadress of ns3.digitalocean.com)

    Then I have configured this same domain to use 3 nameservers
    ns1.maindropletdomain.tld
    ns2.maindropletdomain.tld
    ns3.maindropletdoman.tld

    .............................................................................................................

    IN MY DIGITALOCEAN control panel

    Droplet is created with the domainname maindropletdomain.tld

    Domain records says:

    A | @ | IPADRESS of droplet
    A | ns1 | 173.245.58.51
    A | ns2 | 173.245.59.41
    A | ns3 | 198.41.222.173
    NS | ns1.maindropletdomain.tld.
    NS | ns2.maindropletdomain.tld.
    NS | ns3.maindropletdomain.tld.

    And the content of the Zone File is:

    $ORIGIN maindropletdomain.tld.
    $TTL 1800
    maindropletdomain.tld. IN SOA ns1.digitalocean.com. hostmaster.maindropletdomain.tld. 1420321803 10800 3600 604800 1800
    maindropletdomain.tld. 1800 IN NS ns1.maindropletdomain.tld.
    maindropletdomain.tld. 1800 IN NS ns2.maindropletdomain.tld.
    maindropletdomain.tld. 1800 IN NS ns3.maindropletdomain.tld.
    maindropletdomain.tld. 1800 IN A xxx.xxx.xxxx.xxx (ipadress of droplet)
    ns1.maindropletdomain.tld. 1800 IN A 173.245.58.51
    ns2.maindropletdomain.tld. 1800 IN A 173.245.59.41
    ns3.maindropletdomain.tld. 1800 IN A 198.41.222.173

    .......................................................................................................................

    MY VIRTUAL DOMAINS

    My virtual domains all have set the following nameservers:
    ns1.maindropletdomain.tld
    ns2.maindropletdomain.tld
    ns3.maindropletdomain.tld

    Again, all of this worked yesterday and earlier today, I had even installed Joomla in one of those, but now I can not reach any virtual host, neither using a browser or ftp. If you need/want to know my REAL domainnames then I will have to send it to you in some private message if possible.

  • Also, I find it very strange that http://maindropletdomain.tld IS working but not the virtualdomains. This must mean, that the 3 hostnames I added to this domain in the godaddy domain admin panel (and the corresponding Name Servers) must be correctly configured, otherwise I would not have been able to visit http://maindropletdomain.tld.

    www.maindropletdomain.tld is not working now, as I have removed the CNAME record (www|@) in DO control panel to see if the act of adding this CNAME record was the reason the virtual domains stopped working in the first place.

  • Could the reason for the virtual servers stopped working be that I had activated the firewall without opening port 53? I have now deactivated the firewall, as this activation is the only thing I think I have done between the time the virtual servers was working and now that they do not work (cant access them using browser/ftp)

Have another answer? Share your knowledge.