Admin-Ahead Community

Linux => Control Panels => cPanel => Topic started by: nandulalr on March 19, 2018, 09:23:49 am

Title: Change Document Root in cPanel for Primary domains
Post by: nandulalr 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