Friday, January 28, 2022

How to Change Document Root in WHM and cPanel for Specific Website

First, create a directory in your home directory. Give it the name 'backup'. Secondly, open the terminal in WHM. Then run the following command:

cp /var/cpanel/userdata/USERNAME/* /home/backup

Replace 'USERNAME' with the username of cPanel user that you would like to change its document root. The compand will simply copy all files in the directory "/var/cpanel/userdata/USERNAME" to the directory "/home/backup". The directory "/var/cpanel/userdata/USERNAME" contains configuration files for domains.

Suppose that the domain that you want to change its document root is 'example.com'. In this case, you need to open the file 'example.com' and 'example.com_SSL and edit document root using vim.

Finally, you need to run the following commands to restart apache:

/scripts/updateuserdatacache
/scripts/updateuserdomains
cp /etc/apache2/conf/httpd.conf{,.bak-`date +%Y%m%d`}
/scripts/rebuildhttpdconf
/scripts/restartsrv_httpd
For more information, check here

Wednesday, August 11, 2021

WebFiori Framework Tutorials - 8 - Including External Resource File

In this video, we learn how to include external resource file such as JavaScript file or a CSS file in web pages by using some of the utility methods which are provided by the class 'WebPage'.

Wednesday, August 4, 2021

WebFiori Framework Tutorials - 7 - Building User Interface

In this video, we start by talking about a very important class which is used in building web pages. The class has the name 'HTMLNode'.

Tuesday, July 27, 2021

WebFiori Framework Tutorials - 6 - The Class 'AppConfig'

In this video, we talk about the class which holds basic application configuration. The class called 'AppConfig' and it exist in the root of your application folder.