My virtual content only shows up on the root IP addres

8 posts / 0 new
Last post
#1 Sat, 03/23/2019 - 18:10
bmherard

My virtual content only shows up on the root IP addres

I have set up a virtual server on CentOS Linux 7.6.1810, pointed DNS name servers to it but the only way I can see the site is on the root IP address. The domain comes back and says

"This site can’t be reached briansandbox.work server IP address could not be found. Try: Checking the connection Checking the proxy, firewall, and DNS configuration ERR_NAME_NOT_RESOLVED"

I've checked and the name servers have propagated and the files for the site live in "/home/briansandbox/public_html"

For as much as I can tell the apache server is set correctly too.

I'm using Hostwinds unmanaged cloud solution. My 1st time using an unmanaged hosting package. I could not find this topic or at least not the way I did my search query.

Sun, 03/24/2019 - 03:48
adamjedgar

I write the answer below to also help others...it goes probably a lot further than it needs to to answer your level of knowledge. However, i personally get sick of reading reponses to questions on forums that essentially do zero to help other readers fully understand the subject. So below is a rather long answer...

When you say "i pointed the DNS name servers to your Virtualmin>Virtual Server?

The fact you are saying that you can only browse your website by the server external ip address tells me that the dns is not resolving. The reason that the "webserver external ipAddress method" works is illustrated using the following example...

Pretend you are a postman deliverying a letter to a street address.

Mr Postman knows how to find a house because the country, state, town, street, and number are widely published details. What the postman does not necessarily know, is who actually lives at the particular residence he is delivering letters/parcels to. He reads this often on the front of the letter itself.

On a webserver, these two (ie street address and residents name) are linked via a text file known as a vhosts file. This file which is stored on the webserver, links the website ip address with your domain name (some websites have their own dedicated ip address, others just use the main webhosting server external ip address). In your case, because you can browse the website by ip address, my assumption is, the vhosts file is likely working (of course a real test would be if you are able to access multiple virtualmin>virtual servers on your system using the external ip address.

So, In the event you have checked your vhosts is working correctly and apache is using it as it should, and things are still not working...the following is where i would head next.

If your vhosts file is working, then the problem would be that there is nothing linking your registrar nameserver with your hosting servers ip address. Essentially this means, a letter comming to australia from America hasnt a clue what your suburb and postcode are...and therefore hasnt a clue what post office to send it to in in your district...even though your local post office ( or "vhosts file") knows where your street and house number are and that "you live at that street address" on the webhosting system. Essentially this means that there is a break in the chain and the "the letter" never gets delivered (ie "error name not resolved").

You are essentially bypassing the dns resolution by typing in directly the street address manually yourself. Google already knows the country, state, and suburb of your webserver external ip address, because ip addresses are actually purchased by service providers and then allocated on their own systems accordingly with those kinds of details...which are then widely advertised across the "web universe".

The website names that match up with those external (or public) ip addresses, of which there can be hundreds "per ip address", are most definately not automatically known by browsers/search engines. Hence the need to match names with ip addresses each time a new website is created (taking a little "writers liberty" with last statement...but you get the idea)

The most obvious fix options to your problem are outlined as below: (i say obvious because these are the most common ways of solving the most common reason for your problem)

  1. Have you setup and registered your Webmin Bind DNS Server to act as an internet name server? This requires at least 4 considerations...
a. You have to register your Webmin/Virtualmin web server as a Nameserver (this is done via your domain name at your registrar)
b. configure Bind to function on WEbmin/Virtualmin (should happen automatically on install if i remember correctly)
c. Check the dns records on your bind dns for said domain are correct (should also be pretty automated in Virtualmin)
d. you need to have setup at least 2 dedicated or VPS nameserver instances with "different" ip addresses for it to work consistently and satisfactorily
EDIT... i forgot to mention one important thing about registering your webmin server a nameserver and using its built in Bind DNS. Dont confuse this with one of your virtualmin>virtual servers.

You actually have to register your webmin server itself as a nameserver with the registrar of its own domain name!

So if for example your server was called server1.fancy.com , then this is the nameserver that needs to be registered in the registrar domain management console for domain called fancy.com.

Normally, nameservers use the prefix ns1, or ns2 or ns3 etc. In the case where you are using your webhosting server as one of the (2 required) nameservers, you might instead use the prefix server1 etc.

Also, most of the console i use regularly do not use the same area for registering a nameserver and ip address to it. This is usually setup as a "custom namesever" for the server1.domain.com (google this if needed, its a whole other discussion on its own)


There is a far easier alternative to the above...

  1. Forget about using Bind DNS on your server. If you are simply hosting your own website/s you honestly do not need it and in my humble opinion, the bind example above, serves no purpose other than educating oneself how to use dns, and gives added workload and stress in setting it up. (so for a new setup, you can accept the default virtualmin install that automatically confugures Bind DNS, let it run in the background essentially doing nothing...turn it off if you want too, or just leave it as is after install and figure Bind DNS out later without causing any problems to your website)

  2. Log into your registrar zone file records and add the following...

www - <your server external IP Address> - A (record type) - TTL 8600
your domain.com - <your server IP Address> - A (record type) - TTL 8600

The above 2 "A records" are all that is required at your registrar to pointing at your Webmin Server External IP Address in order to bring website online via its domain.com.

Once you have website online, you may wish also to setup ftp and email. These two below wil need to be added as records at your registrar

ftp.yourdomain.com - A (record type) - <your server external ip address>
mail.yourdomain.com - mx (Record type) - <your server external ip address>

hope this helps

kind regards Adam

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

Sun, 03/24/2019 - 16:07 (Reply to #2)
bmherard

Thank you for the feedback. I tried these things and haven't seen any difference when using my domain name in the browser as before. I'm using namecheap.com and their dashboard is different than I'm used to with Godaddy but I was able to set the DNS records as you mentioned instead of in Virtualmin. However, they want the user to implement their basic DNS and then set up custom dns. So I'm not sure if I should be using domain forwarding???

Brian

Mon, 03/25/2019 - 05:27
adamjedgar

Brian, would you mind sending me a private email of your domain name so i can run some external checks on it myself? adamjedgar "at" hotmail "dot" com. Also, do you have additional web broswers on your computer? I always use more than one browser when developing...sometimes even clearing website data from the browser isnt enough (i had this issue myself today). google chrome was refusing to resolve a domain even though i thought i had cleared everything, however it was working perfectly fine with internet explorer and firefox.

After checking your browsers history and cache is 100% cleared for at least the period you have been having dns resolution issues (say the last 24 -48 hours)...if that still doesnt fix the problem, this is what i would do next

  1. mxtoolbox check to see exactly what server ip address your dns is resolving too?
  2. mxtoolbox check for nameservers are currently assigned to your domain name
  3. place a simple index.html file in your public_html directory so we can check without any fluff that its resolving.

Finally, do you have any other domains on this webmin/virtualmin system?

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, 03/25/2019 - 12:25 (Reply to #4)
bmherard

I got it working before seeing your latest reply. Not sure how, but the domain is rendering correctly now. I did actually disable BIND DNS Server , although from what you mentioned previously might not effect it anyways.

@adamjedgar, I really appreciate your time in responding and offering help. I'd still be stuck if you hadn't assisted me.

Brian

Thu, 03/28/2019 - 10:30
redhat39
redhat39's picture

I'm having the same problem. I can get to the virtualmin login if I use https://(server ip address):10000 but if I try to use my domain name https://tcebstn.us:10000 I get this, "The site can't be reached".

The domain is resolvable and reachable at https://tcebstn.us

Any ideas on what I need to check/configure?

Thu, 03/28/2019 - 10:46 (Reply to #6)
bmherard

I don't believe your domain actually use port :10000. So, the fact that you can access your domain's test page without it seems correct. Your root, ipserveraddress:10000, is the only address that should be using :10000. You would need to FTP into your domain to manage files directly if you don't want to use Virtualmins file manager at the root level. I use Filezilla as it comes in Linux, Windows and Mac versions.

Brian

Thu, 03/28/2019 - 14:21
redhat39
redhat39's picture

Thanks Brian. I have no problem using it as server-ip:10000 I just thought I didn't have something setup right.

Topic locked