Now, suppose if you have a Web hosting company and on your Web server, if you are going to launch only
one site, then it is a wastage of resources.
Now, what we want, we want to launch many sites on one Web server that is called virtual hosting, now
two type of virtual hosting is available.
The first one needs a name based virtual hosting.
What the meaning of a name based virtual hosting that mean
We want to launch many sites by using just a single IP.
And please remember in real life, most of the hosting company that provide that is based
on this concept only name based.
Because when we launch the real website, we need the real IP so if one real IP.
We are going to launch many websites, then it will be cost effective for the customers.
So mostly the offering that Web hosting give us.
They are based on that name based virtual hosting.
that mean in name based virtual hosting on single IP
We can launch many websites, another type of hosting is IP based virtual hosting in which we can
launch one website on a single IP that mean.
If you have to launch three sites, then you need three IPs.
In the case of IP based virtual hosting, but in the name based virtual hosting, if suppose
we have to launch three Web sites, we need only one single IP.
So in our case, this is going to be our lab.
That means master.example.com will be having our apache webserver.
What we are going to do, we are going to create three websites on that.
The sites name will be www.example1.com, www.example2.com, www.example3.com.
We want to launch all these three sites on which ip address 172.24.0.1.
So what will be the procedure.
So in this case, first, what we are going to do step by step procedure, we will go to the /var/www
html directory and we are going to create three.
directories there.
example1, example2, example3 for hosting the Web pages of all three different websites that mean
we will put the content of www.example1.com in example1 directory, web content of www.example2
.com in example2 file and so on.
Then we will make certain changes in our apache configuration file also.
Then we will go to the client side and we will test.
we will test these by using the domainnames and we will also see what happens if we
are going to access the name based virtual hosting by using ip address.
what site it is going to display.
So this is the lab introduction.
Step by step, we are going to create name based virtual hosting.