Allow users to change the DocumentRoot
Open Discussion
As a systems administrator, I think it would be a very useful feature to allow users to change the DocumentRoot of their websites easily and intuitively from cPanel. Currently there are many web frameworks (Symfony among them) that require changes to the Apache configuration to change the DocumentRoot. It could be included as a configuration option in the hosting packages.
It is already possible to change the DocumentRoot for Addon and Sub domains within the cPanel user interface. It is not possible, at this time, to change the DocumentRoot for the primary domain (the domain specified when the account is created).
It is already possible to change the DocumentRoot for Addon and Sub domains within the cPanel user interface. It is not possible, at this time, to change the DocumentRoot for the primary domain (the domain specified when the account is created).
I agree with this feature request. We have had quite a few users resquesting that we renamed public_html folder some to have the same folder structure as for their addon domains (IE /home/USER/domains/domain1.tld, /home/USER/domains/domain2.tld) and recently some that would like this to be changed for frameworks like symfony or laravel that use names like : web or public instead of public_html.
The reason why this is important to them is that they can have the same structure on their local install as on their production install.
public_html has a chmod of 750 it would be good if a user could keep this chmod for the new document root.
I agree with this feature request. We have had quite a few users resquesting that we renamed public_html folder some to have the same folder structure as for their addon domains (IE /home/USER/domains/domain1.tld, /home/USER/domains/domain2.tld) and recently some that would like this to be changed for frameworks like symfony or laravel that use names like : web or public instead of public_html.
The reason why this is important to them is that they can have the same structure on their local install as on their production install.
public_html has a chmod of 750 it would be good if a user could keep this chmod for the new document root.
This makes sense, and is done in at least some way by other control panels. It actually surprised me to learn you couldn't get rid of the public_html folder on a CPanel box. I'd love for that to be addressed.
This makes sense, and is done in at least some way by other control panels. It actually surprised me to learn you couldn't get rid of the public_html folder on a CPanel box. I'd love for that to be addressed.
It would be really nice to have this feature. I already started to suggest to not use their main-domain when creating a cpanel account, so that they keep the ability to change the documentroot with their addon domain.
It would be really nice to have this feature. I already started to suggest to not use their main-domain when creating a cpanel account, so that they keep the ability to change the documentroot with their addon domain.
I use Drupal to develop my sites. With Drupal 7 it was easy to put the site in the public_html directory. With Drupal 8, when it's installed using composer (the recommended way), that is impossible, Composer put it into the "web" directory two directories below public_html, i.e. public_html/xyz/web. I could move everything from the web directory to public_html and put "xyz" one level up from public_html, but it would be much cleaner to point the document root to public_html/xyz/web.
I use Drupal to develop my sites. With Drupal 7 it was easy to put the site in the public_html directory. With Drupal 8, when it's installed using composer (the recommended way), that is impossible, Composer put it into the "web" directory two directories below public_html, i.e. public_html/xyz/web. I could move everything from the web directory to public_html and put "xyz" one level up from public_html, but it would be much cleaner to point the document root to public_html/xyz/web.
Replies have been locked on this page!