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.

whm/apache configuration?..problem

Discussion in 'EasyApache' started by bigpy2003, Feb 26, 2004.

  1. bigpy2003

    bigpy2003 Well-Known Member

    Joined:
    Feb 22, 2004
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    16
    Alright,

    I have added a site to my WHM...the domain it was set to has yet to propegate, however, i goto..

    http://myipaddress/~username

    the script uses PHP's $DOCUMENT_ROOT variable. Anyhow, it's trying to access my "main" site's folder...how do i fix this?
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Is "myipaddress" the IP you've assigned the domain?

    Presuming that it is, try again but with:

    http://myipaddress/~username/

    Note the trailing slash
     
  3. bigpy2003

    bigpy2003 Well-Known Member

    Joined:
    Feb 22, 2004
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    16
    Yes I've tried that. Doesnt work.

    Warning: main(/home/square/public_html/functions.php): failed to open stream: No such file or directory in /home/xec96/public_html/header.php on line 3

    Is just one of the errors that I am getting.
     
  4. bigpy2003

    bigpy2003 Well-Known Member

    Joined:
    Feb 22, 2004
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    16
    The reseller is 'root'...just in case that might help
     
  5. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    I'm currently moving about a hundred sites to a server at the moment and see this type of thing. It usually boils down to the scripts accessing an absolute URL from the top of the domain.

    So, to access bob.php at the top of the site, the calling script references:

    /bob.php

    Of course, using mod_user, this rewrites your crafted URL of:

    http://myipaddress/~username/callingscript.php

    to:

    http://myipaddress/bob.php

    myipaddress will then resolve to the first site listed in httpd.conf (usually your site since it's the first one you create), hence the problem.

    If it's that, there's nothing you can do about it except wait out the propagation.

    We sidestepped this a little by reducing all the DNS TTL's down to 1 hour prior to moving and then restoring them to default, but that's little help to you now ;)
     
  6. bigpy2003

    bigpy2003 Well-Known Member

    Joined:
    Feb 22, 2004
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    16
    says that the doc root for the site is the 'head honcho' one heh
     
  7. bigpy2003

    bigpy2003 Well-Known Member

    Joined:
    Feb 22, 2004
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    16
Loading...

Share This Page