cPanel & WHM Version 98 has been released, and brings a slew of great updates. Take a look at what is included, and then upgrade today!

Allow users to change the DocumentRoot

Juan Baixauli shared this idea 8 years ago
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.

Replies (5)

photo
1

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).

photo
2

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.

photo
1

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.

photo
1

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.

photo
1

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.

Leave a Comment
 
Attach a file