Version 58, new feature about document roots
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?
-
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?
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.0 -
Perfect, thank you! 0 -
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: [LIST] - 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: [LIST]
- If the value is Off, the parameter defaults to thesubdomain_name path, wheresubdomain_name is the subdomain's name. 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.
0 -
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. 0 -
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... ) ;)
The behavior you have described is how the feature is supposed to work: [LIST]- If the Restrict document roots to public_html value is On, the parameter defaults to the public_html/subdomain_name path, where subdomain_name is the subdomain's name.
- If the Restrict document roots to public_html value is Off, the parameter defaults to the subdomain_name path, where subdomain_name is the subdomain's name.
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.Can this be set per reseller account?
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.0 -
Hello, To update, the documentation now reflects the correct behavior: Tweak Settings - Domains - Documentation - cPanel Documentation Thanks! 0 -
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? 0 -
Hello @Benjamin Roberts, What effect, if any, does changing this setting have on existing add-on and sub-domains?
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.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?
Yes, that is an accurate description of how this option works.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?
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.0 -
@cPanelMichael: Thank you. As far as I'm concerned, that cleared up the behavior of this feature. 0
Please sign in to leave a comment.
Comments
9 comments