Improve Domain and Subdomain Directory Structure under public_html
Currently the directory structure of domains and sub-domain is very difficult to manage for users and administrators. Organization is key to having a visual understanding of structures of a website under domains and sub-domains.
The current behavior is the primary domain of an account becomes the root directory of the public_html account:
/home/{account_name}/public_html/[site_files (aka. root of site files)]
Domain:
/home/{account_name}/public_html/[site_files]
Sub-Domain:
/home/{account_name}/public_html/test/[site_files]
Although you can get around this behavior with clever .htaccess rules and manually creating the folder structure, it becomes more cumbersome for users. As per the User Interface and User Experience coming to cPanel, updates should be focused on these inconsistencies in both the interface and organization of files. It is also worth noting that if a directory structure is referenced in an application it cannot be used because it is currently reserved for the sub-domain name.
The proposal is to slightly alter the structure and naming conventions of files and folders generated automatically by cPanel scripts. This should be fully backwards compatiable and could even provide a simple update script to move files and structures appropriately.
Under public_html this is the new proposed structure:
/home/{account_name}/public_html/{domain_or_sub-domain}/[site_files]
Domain:
/home/myaccount/public_html/domain.com/[site_files]
Sub-domain:
/home/myaccount/public_html/test.domain.com/[site_files]
The benefits here are more consistency as well as a decrease of support overhead required with trying to explain the directory structure.
From a hosting perspective, having the sub domain in a sub folder of the main domain is cause for many support tickets. .htaccess rules have to be will crafted to exclude sub domains from misbehaving, custom php directives get applied to domains that ought not get them.
The fix for this is a simple change to /usr/local/cpanel/base/frontend/x3/addon/index.html to make the default addon domain location inside of the /home/myaccount/ directory.
From a hosting perspective, having the sub domain in a sub folder of the main domain is cause for many support tickets. .htaccess rules have to be will crafted to exclude sub domains from misbehaving, custom php directives get applied to domains that ought not get them.
The fix for this is a simple change to /usr/local/cpanel/base/frontend/x3/addon/index.html to make the default addon domain location inside of the /home/myaccount/ directory.
This feature will implement the first part, main domain being in a different folder than public_html) http://features.cpanel.net/responses/as-a-website-owner-i-would-like-my-main-domain-to-use-a-subfolder-like-addon-domains-so-that-i-can-have-better-multidomain-setups
I agree that subdomains should default to folders with their full name and not just what's before the parent domain
This feature will implement the first part, main domain being in a different folder than public_html) http://features.cpanel.net/responses/as-a-website-owner-i-would-like-my-main-domain-to-use-a-subfolder-like-addon-domains-so-that-i-can-have-better-multidomain-setups
I agree that subdomains should default to folders with their full name and not just what's before the parent domain
This is also related to the requests:
https://features.cpanel.net/topic/as-a-hosting-admin-i-would-prefer-to-have-user-accounts-created-at-root-as-a-id-of-some-sort
https://features.cpanel.net/topic/ability-to-specify-primary-domains-document-root-during-creation
This is also related to the requests:
https://features.cpanel.net/topic/as-a-hosting-admin-i-would-prefer-to-have-user-accounts-created-at-root-as-a-id-of-some-sort
https://features.cpanel.net/topic/ability-to-specify-primary-domains-document-root-during-creation
Hey all! While this specific request has not been address, there is a change in v58 that is in the same theme. We added a tweak-setting option that allows you to set the default document root that is suggested to your users: inside public_html, or inside the docroot.
Hey all! While this specific request has not been address, there is a change in v58 that is in the same theme. We added a tweak-setting option that allows you to set the default document root that is suggested to your users: inside public_html, or inside the docroot.
I always override the default suggested paths and mount my sites something like this:
/home/account/domains/site.com/public_html/
/home/account/domains/subdomain.site.com/public_html/
That way I have them in isolated folders where I can protect them by limiting open_basedir.
I always override the default suggested paths and mount my sites something like this:
/home/account/domains/site.com/public_html/
/home/account/domains/subdomain.site.com/public_html/
That way I have them in isolated folders where I can protect them by limiting open_basedir.
Replies have been locked on this page!