Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Change Document Root in cPanel for Primary domains  (Read 2123 times)

0 Members and 1 Guest are viewing this topic.

nandulalr

  • Guest
Change Document Root in cPanel for Primary domains
« on: March 19, 2018, 09:23:49 am »
1) Connect to your server via SSH as the root user.

2) Locate and open the following file (replace your user & domain info):

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

3) Once you have opened the file, look for the following line:

documentroot: /home/USERNAME/public_html

4) Modify the location according to your needs. Save it and exit.

5) Rebuild the Apache conf:

Code: [Select]
/scripts/rebuildhttpdconf

6) Restart Apache service:

Code: [Select]
service httpd restart