Changing DocumentRoot of all sites
Changing DocumentRoot of all sites and leave as default DocumentRoot below:
/public_html
to
/public_html/www
www is DocumentRoot of all sites.
My apache server is 2.4, tutorials here forums cpanel not working.
-
Hello, You can modify the document root for a domain name by editing the "documentroot" entry in the appropriate cPanel user data file: /var/cpanel/userdata/$username/$domain.com
Then, rebuild the Apache configuration file via:/scripts/rebuildhttpdconf
You will need to develop a script that completes this action for all accounts, and runs automatically when new accounts are created, if you prefer to automate this functionality. Thank you.0 -
I believe you do not understand, let's go. In my hosting use mainly laravel, and would leave already configured that each account created apache make reading the DocumentRoot in public_html/www Would it automatically, every account created a template for this was generated. I have changed the /root/ cpanel3-skel/public_html to automatically create the www folder and with the necessary access, could understand? Thank you very much. 0 -
Hello, I believe this is the document you are seeking if you want to edit the default Apache template: Custom Templates - EasyApache - cPanel Documentation There's also a thread here that discusses such as change: DocumentRoot and htttpd.conf Thank you. 0 -
Hello, I believe this is the document you are seeking if you want to edit the default Apache template: Custom Templates - EasyApache - cPanel Documentation There's also a thread here that discusses such as change: DocumentRoot and htttpd.conf Thank you.
Great job man, very very very very goooooood! Thanks Michael!0 -
I'm happy to see that information was helpful. Thank you for updating us with the outcome. 0 -
why don't build it default from cPanel installation, so we don't need more costumize... sigh.... 0 -
why don't build it default from cPanel installation, so we don't need more costumize... sigh....
Hello @hrace009, We do have a feature request opened to allow users to update the document root for the primary domain name associated with the account through cPanel: Allow users to change the DocumentRoot I encourage you to open a new feature request if you'd like to see the ability for administrators to change the default document root for new accounts via an option in Web Host Manager: Submit A Feature Request Thank you.0
Please sign in to leave a comment.
Comments
7 comments