Nameservers, DNS, and confusion

Discussion in 'Linux VPS/Dedicated - cPanel' started by bubinski, Sep 27, 2008.

  1. bubinski

    bubinski New Member

    OK, I did well most of the day with my new VPS account with cPanel/WHM:

    1. Created one package and one account - I will only run one website on my VPS (I'm not a reseller).
    2. Downloaded PuTTY so I could login directly to server without cPanel when needed.
    3, Installed and configured csf+lfd successfully.
    4. Uploaded most of my files to public_html in my newly created account.

    Now here's were I fall apart. I know I need to update my DNS info with my registrar but I haven't done that yet because I really want to test my files first. I figure I can see my webpages by going to "http://myipaddress" and it should work so I thought...but it doesn't... I see the "Great Success! Apache is working on our cPanel" page.

    I read all the posts I can find about DNS and nearly all are about changing name servers with your DNS regsitrar. I try the "http://myipaddress/~accountname" and I can see my webpages but not showing properly (no CSS, javascript, etc). Then I start thinking if my root is "myipaddress" and I change my name servers with my DNS registrar, at that point won't everyone coming to my site after it propogates just see my "Great Success! Apache is working" page instead of my website? I think I'm missing something in the setup somewhere in WHM to do with IP addresses, nameservers, and the like but I just can't figure it out.

    I'm wondering if I messed up the "The Basic cPanel/WHM Setup". My setup e-mail assigned IPs to me as:

    ns1.mydomainname.com xx.xxx.5.xxx
    ns2.mydomainname.com xx.xxx.6.xxx

    However in "The Basic cPanel/WHM Setup" I'm showing :

    ns1.mydomainname.com is set to xx.xxx.6.xxx
    ns2.mydomainname.com says there are no more IPs available

    and further up under "Main Shared Virtual Host IP" my xx.xxx.5.xxx is set there and apparently assigned to "host.mydomainname.com".

    I'm really confused. Sorry to seem to stupid. Can anyone enlighten me?
    Thanks.

     
  2. bogey9000

    bogey9000 SHADO Operative

    I don't have an answer to your server setup questions but I do know an easy way to test a website before you update the nameserver with the register.

    On a Windows computer you can add a static ip to the hosts file. All you need to do is open the file with notepad (usually in c:\windows\System32\drivers\etc\hosts) and add your vps server ip address followed by a tab and then your actual domain name like this:

    xxx.xxx.xxx.xxx www.example.com

    Use your actual domain name as you have it setup on the server. Save the hosts file and open a new browser window and test your domain. Works great. I believe mac and linux have a similar file you can use to set static ip addresses.

    Good luck!

    Mike

    Just don't forget to remove or comment out the line when you are done testing.
     
  3. bubinski

    bubinski New Member

    Thanks bogey9000. I was able to view my pages pretty normally now using your advice. But still not getting my mysql and some php to work properly. And still not sure about my ip settings.
     
  4. Dan

    Dan Moderator

    Hello bubinski,

    In WHM go to Nameserver IPs and you should be able to assign ns2 to your other IP there. Don't worry about the fact that they're reversed, it won't hurt anything.

    The reason why you cannot go to your main shared IP and see your website is because it's a shared IP and it will typically show the page/s for the host name.

    As far as viewing your site as it should be you're not likely to be able to since it most likely is configured for the domain name and it knows it's not being accessed through the domain name since it doesn't resolve yet. If everything's uploaded and the same as what you had previously on your old host then everything should be fine.
     
  5. bubinski

    bubinski New Member

    Hey Dan,

    Thanks for the info. I did go to "Nameserver IPs" but what really confused me is that both of my IPS are in use. Since I only had two, there is nothing left for me to assign to ns2. In the section mentioned above it appears like this:

    IP Nameserver
    xx.xxx.5.xxx host.mydomain.com
    xx.xxx.6.xxx ns1.mydomain.com

    So is "host" really ns2? It seems everwhere I can find reference to ns2 in WHM there is nothing set, its empty. And I'm just wondering how that affects my DNS when I point my domain to my new ips with my domain registrar....how to set ns2 with my domain registrar if I don't have a corresponding ns2 with my VPS?

    On a brighter note, I was able to use "bogey9000's" suggestion, view my website, resolve some mysql issues, find some php issues I still need to work on. Slowly but surely. Thanks a bunch.
     
  6. bubinski

    bubinski New Member

    Ok reading the posts here I noticed someone had almost something similar to mine back in March. They had tech support fix there problem. Reading over their solution I ended up going into "DNS Functions" in WHM under "Edit DNS Zone" I saw I had only an "ns1 14400 in A xx.xxx.6.xxx" but no "ns2" entry. Tech support had fixed the other guys problem by adding both "ns1" and "ns2" entries here. Since my "ns1" entry was for what I consider my second IP, not my main, I changed this to my main Ip "xx.xxx.5.xxx" and added the "ns2" entry using the "xx.xxx.6.xxx" IP.

    Then I went back to "Nameserver IPs" and deleted the "ns1" entry there and went back and created a new nameserver to assign the second IP, but it automatically assigned it for me.

    So before this under "Nameserver IPs" it was:

    xx.xxx.5.xxx host.mydomain.com
    xx.xxx.6.xxx ns1.mydomain.com

    Now it is:

    xx.xxx.5.xxx host.mydomain.com
    xx.xxx.6.xxx ns2.mydomain.com

    Not sure if I fixed it or not. I guess I'll find out after propogation. But at least I've got both ns1 and ns2 entries in DNS Zone, which is what tech support supplied to the other guy before. I didn't have ns2 there before.

    After all the past 3 days of a steep learning curve this DNS IP stuff is the only thing that has confused me. I've solved all my other problems and my website works at least in the server. Not sure if it will work once the Web finds it.
     
  7. Dan

    Dan Moderator

    Hello bubinski,

    You can and will have multiple things assigned to an IP but it sounds like you may have gotten things figured out. After your nameservers propagate you can run a dig against them to make sure things are working as they should be :)
     

Share This Page