Change the document root of a domain setup in WHM
The document root folder is the folder that Apache will use to look for the files associated with the website set up in WHM. The default document root folder is always the public_html folder located at /home/cPanel-Username/public_html. In some cases, it might be required to change the document root folder to point to a different folder or even a different location. In this guide, we will change the document root of a website to point to a new folder in the same account which has been set up inside WHM.
Update the Document Root Path
In the following two files first, modify the document root path to point to the correct path. You changing the values for both the secure and insecure version. Remember to change both or you will get inaccurate results.
Once you have your new document root path placed in the correct files next, remove the existing cache files
Then rebuild the cache files and rebuild the Apache configuration file
Finally, restart Apache and your new document root path will come into effect.
That is the process complete and you have now updated the document root path of a domain name setup in WHM.
How was this article? – Change the document root of a domain setup in WHM
You might also like
More from cPanel
Understanding The Exim Log Files And Their LocationsOn cPanel servers the default mail program is Exim. Exim will handle anything …