Skip to main content

Editing a DocumentRoot problem

Comments

2 comments

  • SS-Maddy
    Hello @veepee Your requirement is not clear for me. Can you please explain your issue more ? cPanel by default uses /home/user/public_html as its DocumentRoot for a domain hosted in a server. Or are you saying that you changed from /home/user/public_html to /var/www/html. In either case, whatever changes you make to the httpd.conf, you should edit it from WHM >> Home >> Service Configuration >> Apache Configuration
    0
  • cPanelLauren
    Hi @veepee You cannot modify the httpd.conf directly all changes made to it will be reverted. The only way to change a domain's document root is to modify the userdata files at /var/cpanel/$user/userdata
    then run the following: /scripts/updateuserdomains /scripts/updateuserdatacache mv /etc/apache2/conf/httpd.conf{,.bk} /scripts/rebuildhttpdconf /scripts/restartsrv_httpd
    I want to note that while it is possible to make these customizations this is not something supported by cPanel. Thanks!
    0

Please sign in to leave a comment.