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.

How to change the RootDoc for website? not subdomain

Discussion in 'General Discussion' started by AviMoto, Apr 4, 2012.

  1. AviMoto

    AviMoto Member

    Joined:
    Feb 28, 2012
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I'm try to change the RootDocument in the main domain with include file but it'd not work.
    How can I change the RootDocument?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,668
    Likes Received:
    646
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    You can modify the "documentroot" value in the following file:

    Code:
    /var/cpanel/userdata/username/domain.com
    Simply replace "username" with the user name of the account, and "domain.com" with the domain name you would like to edit the document root for. After you have modified the "documentroot" value in this file, you will need to rebuild the Apache configuration file via:

    Code:
    # /scripts/rebuildhttpdconf
    Thank you.
     
  3. AviMoto

    AviMoto Member

    Joined:
    Feb 28, 2012
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks a lot,
    I see the /etc/httpd/conf/httpd.conf was change but still when I try to load mylandpage.co.il it's go to /public_html and only if I go to mylandpage.co.il/public the application load.

    do I need to restart httpd?

    And if I want to add <directory > instruction I'll do it in the same file?
     
  4. NixTree

    NixTree Well-Known Member

    Joined:
    Aug 19, 2010
    Messages:
    386
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Gods Own Country
    cPanel Access Level:
    Root Administrator
    Hello,

    Yes, you have to restart Apche after rebuilding httpd.conf, to refelct the changes in it. No, don't put any Apche related confs in cpanel/userdata files. You can use the include files specified in the httpd.conf, for the particular domain.

    Thank you,
    Nibin.
     
  5. AviMoto

    AviMoto Member

    Joined:
    Feb 28, 2012
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    The httpd restart was help.

    So for now just the question about <directory> instruction
     
  6. AviMoto

    AviMoto Member

    Joined:
    Feb 28, 2012
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks again:)
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,668
    Likes Received:
    646
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  8. AviMoto

    AviMoto Member

    Joined:
    Feb 28, 2012
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page