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.

Default directory changed on one account

Discussion in 'General Discussion' started by JohnR, Mar 30, 2011.

  1. JohnR

    JohnR Member

    Joined:
    Dec 12, 2002
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    I moved an account from one server to another and on the new server the default directory is now /public_html/www/ instead of the normal (to me at least) /public_html/

    There are several accounts on the server the site was moved to and they are all working as expected. The account was moved using the account password but so were several of the others.

    Searches have not returned any ideas and I am out of things to look at. Any ideas here?
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Check /var/cpanel/userdata/username/domain.com to see the "documentroot" listed there for the account where username is the cPanel username and domain.com is the domain name. If the documentroot listed in the file is the wrong path, change to the correct path, then run the following commands to back up Apache's configuration (httpd.conf file), rebuild Apache and restart Apache:

    Code:
    cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.bak110330
    /scripts/rebuildhttpdconf
    /etc/init.d/httpd restart
    This should correct the issue for the domain's default document root. You can also check httpd.conf at /usr/local/apache/conf/httpd.conf after running the rebuildhttpdconf command to ensure it now shows the right document root for the domain. If you don't see the site working after the Apache restart (the last command), please check in a proxy such as proxify.net or kproxy.com as many times you might still be cached after correcting the path for the site.
     
  3. JohnR

    JohnR Member

    Joined:
    Dec 12, 2002
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    That seems to have done it. Thanks! Not sure why it was wrong but appears to be working now.
     
Loading...

Share This Page