Change Document root directory
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
-
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 Thanks0 -
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??? 0 -
exist and .htaccess way change document root? /public_html/webroot 0
Please sign in to leave a comment.
Comments
4 comments