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
Stop Spam Being Received On cPanel Servers (Filter out Spam)This guide is about stopping spam being received on a cPanel …
Optimize a SolusVM VPS Server Running Virtuozzo/ OpenVZ For the most part, the default CPU setting used by SolusVM will be …