How to change document root of a domain cPanel

Are you interested for monthly server support with Unlimited tickets, 24×7 monitoring, Security Audit and lot more ? please check our Monthly server support plans

Follow the steps below for changing the document root of a domain.

Step 1.

Login to the server via ssh

Step 2.

Edit the following file from the server,

/var/cpanel/userdata/USERNAME/DOMAIN.COM

Step 3.

Look for the following line in the file,

documentroot:

Modify the location as per your need and save the file

Step 4.

Rebuild the apache configuration using the following command,

/scripts/rebuildhttpdconf

Step 5.

Restart the httpd service using the command below,

service httpd restart

Now it will be changed..
Need our help to fix the issue ? Submit Support Ticket Now

View Server Administration Packages

Leave a Reply

Your email address will not be published. Required fields are marked *