#
Create the Directory Structure
First, create the directory structure in which we hold the website data to the serve on the internet for the visitors.
The Default Document Root location is /var/www/
. Apache always looks at /var/www/
to find the content of the site. If you want to change the default path of Document Root. Simply edit the main Apache configuration file /etc/httpd/conf/httpd.conf
.
To change the Document root edit the configuration file and the change the path of Document Root
and the Directory
of the Document Root
.
Create the Directories using the mkdir
command with -p
extension that allow us to create a folder with a nested folder inside it.
In these directories we will create the public_html
that hold our actual website files. It's not compulsory that you have to put the files public_html
folder.
If you want to host multiple website then you have to create multiple directories for each of the Domain.
mkdir -p /var/www/securezone.co.za/public_html
mkdir -p /var/www/api.securezone.co.za/public_html