Serve HTML page through Apache
Hello readers, In my previous blog, I had explained how to serve html page through nginx web server. In this blog we will install an Apache web server and serve html web pages using it.
Install Apache2
Now the server is installed , let’s start the server.
we can see the server is active and running.
These are the files of apache2
The main configuration file is apache2.conf
The default path for html page in Apache is /var/www
Now if we want to host our own website, we have created directories in www as shown by tree command.
The html page that is running on our localhost is set to default in sites-available directory. If we want to host our own website we can create its directory in sites-available and do configuration in it.
Create soft link of file in sites-enabled
As we have configured everything we need to enable the configuration file
Restart the server
Now we will do changes in /etc/hosts file