Leon savvides

Member
Sep 2, 2016
11
1
3
Polis
cPanel Access Level
Root Administrator
how set document root rather default public_html/ to /public_html/webroot/ ?
this is a cake php site and and needs document root be on webroot?

I have cpanel 58 & centos 6.8
 
Last edited by a moderator:

lldeepakll

Well-Known Member
May 20, 2012
85
3
58
India
cPanel Access Level
Root Administrator
how set document root rather default public_html/ to /public_html/webroot/ ?
this is a cake php site and and needs document root be on webroot?

I have cpanel 58 & centos 6.8
You can do it in following way:

Open the file /usr/local/apache/conf/httpd.conf using any text editor (vi or nano)and go to the virtualhost section of the domain name for which you want to change the DocumentRoot.

Replace the following line
DocumentRoot /home/username/public_html (username is your actual cpanel username)

with new one
DocumentRoot /home/username/public_html/webroot

Save the file.

Restart the apache service using following command
# /etc/init.d/httpd restart

You also need to run the command below which will run the cPanel Apache Distiller. This will prevent cPanel and Apache from removing any changes you made whenever Apache gets recompiled.

# /usr/local/cpanel/bin/apache_conf_distiller --update


Thanks
 

Leon savvides

Member
Sep 2, 2016
11
1
3
Polis
cPanel Access Level
Root Administrator
are you from forums admin...
can you give and some urls (for this action) to be double correct, and trust

by running distiller and after a while remove a domain ... will be any problem???