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.

Document Root inaccurate on new account?

Discussion in 'General Discussion' started by muppsy007, Mar 16, 2009.

  1. muppsy007

    muppsy007 Member

    Joined:
    Dec 10, 2008
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I'm a PHP developer and I've basically been thrown in the deepend with WHM on a new server. We have:

    cPanel 11.24.4-R34599
    WHM 11.24.2 - X 3.9
    CENTOS 5.2 i686 on standard

    I'm managing to find my way around OK, and have tried migrating my first website to this server. Account setup went fine, and I can browse to the new site.

    In my config script for the site, there is some setup code that makes use of $_SERVER['DOCUMENT_ROOT'] to define a base path for the entire site. This method has always worked well for me on other servers.

    The problem with the new WHM server is for this account, the document root is being returned as /usr/local/apache/htdocs.

    There is no account identifyer, and to be honest, I would have thought it would have been more like /home/account/public_html. The result of this is that all scripts that use the docroot as defined in this setup file fail to include anything. (because the files don't exist in that location)

    Am I missing a setting somewhere in WHM?

    Cheers
    Aaron
     
  2. muppsy007

    muppsy007 Member

    Joined:
    Dec 10, 2008
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Cancel that - I was looking at the account using the shared ip followed by ~account.

    e.g. http://111.111.111.111/~account/

    So the doc root would be something central ofcourse.

    After propogating the domain name, it worked fine, albeit there is no trailing slash at the end of the DOCUMENT_ROOT like our old server.

    Aaron
     
Loading...

Share This Page