Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    4

    Default Change the "document root" of a domain

    Hi all

    I am newbie to the forum although fairly familiar with Cpanel in general.

    I have a website that has two domains. One French and one English. They share the same root folder although the English files are in a subfolder.

    I need to figure out how to change the "Document root" of the English domain to a subfolder of the French root.

    In case you have no idea where I get "document root" from... In "Addon domains" one of the listed information is "document root" but I can't change it.

    So where can I change that?

    Thanks newbie Ramzez

  2. #2
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    You can change the document root of a sub-domain by removing the sub-domain then re-adding it. This will not affect any of the files on the server unless you choose to delete the files yourself.

  3. #3
    Registered User
    Join Date
    Dec 2008
    Posts
    4

    Default

    I see what you mean however its not a subdomain that I am talking about.

    However your your suggestion applies to both subdomains or domains.

    Thanks

  4. #4
    Member apscinsspl's Avatar
    Join Date
    Mar 2008
    Posts
    112

    Default

    Hello,

    Allo document root information is stored in:

    /etc/httpd/conf/httpd.conf file

    You can edit that file and make the changes for Document root.

    After saving the changes just do

    service httpd restart

  5. #5
    Registered User
    Join Date
    Dec 2008
    Posts
    4

    Default

    Speaking for most newbies....I have no idea what the f### you are talking about. ;-) All the controls I use are GUI. Those instructions do not look GUI to me.

    Ramzez

  6. #6
    Member apscinsspl's Avatar
    Join Date
    Mar 2008
    Posts
    112

    Default

    The httpd.conf is not to be edited via a GUI but via ssh , secondly if you want to change the document root for addon domain, delete and readd it and mention the document root for it as the folder name in which you uploaded files for it.

  7. #7
    cPanel Partner NOC cPanel Partner NOC Badge Zishan's Avatar
    Join Date
    Aug 2005
    Posts
    104

    Default

    Quote Originally Posted by apscinsspl View Post
    Hello,

    Allo document root information is stored in:

    /etc/httpd/conf/httpd.conf file

    You can edit that file and make the changes for Document root.

    After saving the changes just do

    service httpd restart
    In cPanel 11, custom changes made to httpd.conf will not be preserved. httpd.conf is generated based on /var/cpanel/userdata/ data. If you need to change the document root for a domain then it needs to be changed in /var/cpanel/userdata/username/domain.com. After that you need to rebuild httpd.conf as:

    /usr/local/cpanel/bin/build_apache_conf

    Quote Originally Posted by ramzez
    All the controls I use are GUI. Those instructions do not look GUI to me.

    Ramzez
    If you don't have root ssh access, then it won't be possible. You need to contact the Host/Provider in that case.

  8. #8
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by apscinsspl View Post
    The httpd.conf is not to be edited via a GUI but via ssh , secondly if you want to change the document root for addon domain, delete and readd it and mention the document root for it as the folder name in which you uploaded files for it.
    Portions of httpd.conf can be edited indirectly via WHM by going to WHM -> Service Configuration -> Apache Configuration.

  9. #9
    Member
    Join Date
    Oct 2005
    Posts
    19

    Default

    Hi,

    I dont think this is a big issue, please ask your hosting provider to chnage the DocumentRoot for your english domain.

    vi /usr/local/apache/conf/httpd.conf

    find your english domain virtualhost entry, and change the documnetroot

    Regards
    http://ehostpros.com/

Similar Threads & Tags
Similar threads

  1. Permission Error: file automaticaly change to "root"
    By kunnusingh in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 03-23-2010, 04:14 AM
  2. Replies: 11
    Last Post: 06-11-2009, 07:15 AM
  3. Domain root was "hijacked" by rails
    By Gerto in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 10-31-2008, 03:36 AM
  4. Change URL of "Home" & "Logout"
    By XinXang in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 01-28-2005, 04:16 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube