The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

odd problem

Discussion in 'General Discussion' started by phantom, Oct 4, 2003.

  1. phantom

    phantom Well-Known Member

    Joined:
    Sep 17, 2002
    Messages:
    123
    Likes Received:
    0
    Trophy Points:
    16
    Hi,
    For some reason, the master IP of one of my servers pulls up a name based site on the server. This is a problem because when other people create subdomains on their domain account, it will pull up this site on any 404 traffic. Not sure what to do. Anybody have any ideas?

    Here's what I've done.

    1. Checked the DNS zones. Everything seems fine.

    2. This site used to share nameserver ip's with the servers master name servers. All references to it I can find have been deleted.

    Thanks!

    cPanel.net Support Ticket Number:
     
  2. GrimReaper

    GrimReaper Active Member

    Joined:
    Jul 27, 2003
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    It is possible that your hosts file may have the wrong settings in it even though WHM may be saying something different.

    I would check the hosts file and make sure the I.P. is pointing to the correct place.

    Here's how.
    ----------------
    SSH into your box as Root. (Or SU to root).

    cd /etc
    pico -w hosts

    Check to make sure the I.P. on the left (your main site I.P.) corresponds with your servers hostname.

    E.g. it should look like that

    231.343.24.34 myhostname.myserver.com myhostname

    Obvisouly replacing it with your details.

    Its ok to have 127.0.0.1 in there up the top as well.

    -----------------

    That may be the problem. give it a whirl.

    Chris.

    cPanel.net Support Ticket Number:
     
  3. phantom

    phantom Well-Known Member

    Joined:
    Sep 17, 2002
    Messages:
    123
    Likes Received:
    0
    Trophy Points:
    16
    Hi,
    I checked that and it is pointing to the correct place. Here's another way to explain the problem.

    All of my hosting accounts are using name based hosting. All of the accounts are on the main IP of the server. howerver, when you type in the IP in a browser, one of the name based hosting accounts shows up. What would make just one particular site show up as opposed to another site on the server?

    cPanel.net Support Ticket Number:
     
  4. rbmatt

    rbmatt Well-Known Member

    Joined:
    Oct 21, 2002
    Messages:
    212
    Likes Received:
    0
    Trophy Points:
    16
    Check in your httpd.conf
    Is that site the first one listed with that IP?

    cPanel.net Support Ticket Number:
     
  5. phantom2

    phantom2 Well-Known Member

    Joined:
    Jan 3, 2004
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    Actually yes it is. What should I do? Somethinh has to be listed first. I just cant figure out why when someone adds a subdomain or addon domain, it automatically redirects to that particular site. It's actually happening on 2 servers now.

    This is bad because the site that its redirecting to is an adult site and when a non-adult site client sees this site coming up when they type in their domain, you can imagine the problem it can cause. One of the sites it happened to was a site for children. REALLY bad.
     
  6. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    Here's a thought, don't host sites you wouldn't show to children. :rolleyes:
     
  7. phantom2

    phantom2 Well-Known Member

    Joined:
    Jan 3, 2004
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    This is the cpanel help forums. Not the ethics forum. If you're not going to help, I suggest you keep your opinions to yourself.
     
  8. SonServers

    SonServers Well-Known Member

    Joined:
    Oct 24, 2001
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    6
    Here is what I did:

    1. Created name based account on the shared IP as a subdomain of my main site called default.mysite.com

    2. Created an index.html page on that new default.mysite.com account that simply says "The page you requested can not be found on this server"

    3. In httpd.conf, moved that virtual host to be the first one in the list

    I did that to stop the confusion that a few customers were having when trying to access subdomains of their own sites that didn't exist. Doing what you can to help protect innocent children from yourself is always a good thing too.
     
  9. phantom2

    phantom2 Well-Known Member

    Joined:
    Jan 3, 2004
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    Thank you for your post. I will try exactly what you suggested. Hopefully that will fix it. I did not expect to have this kind of problem. Fortunately, no children saw the site. It was a new site that a non-adult client was hosting.

    Thank you very much!
     
  10. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    Touched a nerve did I? :D

    You post on a public forum and expect to be able to control who can respond or how the post should be phrased? I was helping, but you just couldn't see it because my reply didn't fit in with your expectations. That's the way it goes sometimes.
     
Loading...

Share This Page