Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

PHP & Lynx can't resolve any domains created with WHM

Discussion in 'General Discussion' started by promixe, Jul 10, 2006.

  1. promixe

    promixe Registered

    Joined:
    Jul 4, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    151
    Hi,
    I was trying to access a file (located on my local server, different domain name) from a PHP script through HTTP and the script was returning a 404 error. I looked the file up in the browser on my client machine and of course it was there.
    Then I launched Lynx in the terminal and typed in my main shared-IP domain name and it said "cPanel - There is no website configured for this address". I typed in the IP address of that site and it popped up right away. Then http://xxx.xxx.xxx.xxx/~username/resource.file worked perfectly while http://username.com/resource.file was returning 404 both in Lynx & PHP and was working fine from any remote machine.
    The only name that resolves properly on the serverside is my main dedicated-IP domain.

    I'm a newbie so I'm a little puzzled about steps to take to repair that problem. Any help would be greatly appreciated!
    Thanks!
     
  2. promixe

    promixe Registered

    Joined:
    Jul 4, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    151
    A little follow up:
    I manually typed xxx.xxx.xxx.xxx needed_sharedIP_domain.com in /etc/hosts and it works now. But what I'm wondering about is do I have to enter this for all 40 of my domains? Isn't CPanel somehow supposed to do this automatically? Or am I doing something wrong by manually modifying /etc/hosts to fix this specific problem?
    Thanks.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice