Skip to content

Instantly share code, notes, and snippets.

@drakakisgeo
Last active April 27, 2016 11:35
Show Gist options
  • Save drakakisgeo/4f33f18e2751247eebb3195c97645075 to your computer and use it in GitHub Desktop.
Save drakakisgeo/4f33f18e2751247eebb3195c97645075 to your computer and use it in GitHub Desktop.
How to change document root in Cpanel
You must edit the file:
/var/cpanel/userdata/USERNAME/DOMAIN.COM
and change the line:
documentroot: /home/USERNAME/public_html
to
documentroot: /home/USERNAME/public_html/DOMAIN.COM
***************
if the domain is under SSL
Update the
/var/cpanel/userdata/USERNAME/DOMAIN.COM_SSL file as well
***************
and then run:
/scripts/rebuildhttpdconf
service httpd restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment