Skip to main content

Adjusting web root location

Comments

3 comments

  • cPanelMichael
    Hello :) You can modify the document root for a domain name by editing the "documentroot" entry in the appropriate cPanel user data file: /var/cpanel/userdata/$username/$domain.com
    Then, rebuild the Apache configuration file via: /scripts/rebuildhttpdconf
    Thank you.
    0
  • Breuddwydion
    Is this still the best way to modify the domain roots, or is there a cPanel / WHM -only way to do this? Now that cPanel has evolved for a couple of years, I'd prefer not to do something that might "confuse" the GUI going forward if this is available via the GUI.
    0
  • cPanelMichael
    Is this still the best way to modify the domain roots, or is there a cPanel / WHM -only way to do this? Now that cPanel has evolved for a couple of years, I'd prefer not to do something that might "confuse" the GUI going forward if this is available via the GUI.

    Hello, You should follow the instructions on the document below when making this change with EasyApache 4: Modify Apache Virtual Hosts with Include Files - EasyApache 4 - cPanel Documentation Setup a custom include file for the domain name and define a custom DocumentRoot value. Let us know if you have any questions. Thank you.
    0

Please sign in to leave a comment.