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.

Version 58, new feature about document roots

Discussion in 'General Discussion' started by louish, Aug 9, 2016.

  1. louish

    louish Member

    Joined:
    Feb 2, 2006
    Messages:
    23
    Likes Received:
    1
    Trophy Points:
    3
    After upgrading to version 58, I got a prompt that said the following:

    Make document roots in the public_html directory?

    In older versions of cPanel & WHM the Addon and Sub Domain creation interfaces suggested a directory within ~/public_html as the document root of the new domain (e.g. ~/public_html/example.com). Beginning with version 58 you can choose to have the suggested document root be within the account’s home directory (e.g. ~/example.com), or within the traditional ~/public_html location. Note: Enabling this setting restricts Addon and Sub Domain document roots to the public_html directory.




    On one server, I chose the wrong answer and I need to find where this setting is to fix it. I want document root's to stay in ~/public_html and I accidentally said disable when I was supposed to choose enable. I cant find where, in WHM, to change this setting?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    Thank you for taking the time to post this question on our forums.

    The option you are looking for is found under the "Domains" tab in "WHM >> Tweak Settings":

    "Restrict document roots to public_html"

    You can find additional information about cPanel 58 in the release notes located at:

    58 Release Notes - Documentation - cPanel Documentation

    Thank you.
     
  3. louish

    louish Member

    Joined:
    Feb 2, 2006
    Messages:
    23
    Likes Received:
    1
    Trophy Points:
    3
    Perfect, thank you!
     
    cPanelMichael likes this.
  4. swbrains

    swbrains Active Member

    Joined:
    Sep 13, 2006
    Messages:
    40
    Likes Received:
    2
    Trophy Points:
    8
    I think I'm confused by the version 58 change doc and the regular cPanel documentation (at Tweak Settings - Domains - Documentation - cPanel Documentation), which both read:
    • This setting prevents the creation of addon domains and subdomains outside of a cPanel user's primary domain's document root (the public_html directory within the user's home directory). If you enable this setting, the system creates new addon domain and subdomain document roots directly within the user's home directory.
    • For example, if you enable this setting and then create the example.com addon domain, the system creates the /home/username/example.com directory rather than the /home/username/public_html/example.com directory.
    But in the cPanel API docs for the addsubdomain function says:
    It seems when I tried this option in actual practice, my experience matches the API docs. That is, setting the option is On/Enabled in WHM, the default value causes the system to create a subdomain under the public_html directory, not in the account's /home/username directory. With this value Off/Disabled, it seems to create the subdomain in the account's /home/username directory, not under the public_html directory. Am I just not reading the change docs correctly? (It's late here... ) ;)

    Thanks for any clarification you can provide.
     
  5. dnavarrojr

    dnavarrojr Member

    Joined:
    Feb 13, 2014
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Can this be set per reseller account?

    For example, I want to enable it for older accounts and disable it for a new reseller account.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    The behavior you have described is how the feature is supposed to work:

    I've opened a case with our documentation team to correct the other documents that reference this setting. I'll update this thread once the issue is corrected.

    It's not possible to configure this for individual resellers at this time, but feel free to open a feature request via:

    Submit A Feature Request

    Thank you.
     
  7. Benjamin Roberts

    Benjamin Roberts Registered

    Joined:
    Jun 3, 2016
    Messages:
    4
    Likes Received:
    1
    Trophy Points:
    1
    Location:
    Kilgore, Texas, USA
    cPanel Access Level:
    Root Administrator
    What effect, if any, does changing this setting have on existing add-on and sub-domains?

    Does the setting simply affect the available locations (i.e. above or below ~/public_html) in which add-on and sub-domains can be created using the cPanel Web portal based on the setting's value the moment the action is attempted?

    Was this feature introduced for any reason other than to accommodate more flexibility and server administrator preferences? In other words, are there any particular pros or cons to choosing one value over the other for this setting as it relates to practicality or security?
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello @Benjamin Roberts,

    This setting does not modify the document roots on existing add-on and subdomains. It only effects new addon and subdomains created after the option is enabled.

    Yes, that is an accurate description of how this option works.

    It was implemented as an option due to user requests for the feature on feature requests such as:

    Addon domains created at account root as a folder

    Some of the feedback in that request included better directory organization to make it easier for end-users to understand where to upload files, and solving issues with Mod_Rewrite rules.

    Thank you.
     
  9. Benjamin Roberts

    Benjamin Roberts Registered

    Joined:
    Jun 3, 2016
    Messages:
    4
    Likes Received:
    1
    Trophy Points:
    1
    Location:
    Kilgore, Texas, USA
    cPanel Access Level:
    Root Administrator
    @cPanelMichael: Thank you. As far as I'm concerned, that cleared up the behavior of this feature.
     
    cPanelMichael likes this.
Loading...

Share This Page