1
00:00:00,330 --> 00:00:07,320
Now we need to make the appropriate changes in our httpd.config file, which is a apache configuration

2
00:00:07,320 --> 00:00:07,660
file.

3
00:00:08,100 --> 00:00:11,220
So we will again make three virtualhost entries.

4
00:00:11,940 --> 00:00:16,620
First, virtualhost entry will be VirtualHost 172.24.0.1.

5
00:00:17,370 --> 00:00:21,840
What will be the ServerName, ServerName will be 172.24.0.1.

6
00:00:22,080 --> 00:00:28,730
And it is going to serve the material from /var/www/html/example1 directory and then we will close this stanga.

7
00:00:29,550 --> 00:00:37,890
Then second virtualhost, we are going to launch on 172.24.0.2 and we are saying that please assume

8
00:00:37,890 --> 00:00:46,260
that ServerName is 172.24.0.2 and we are going to specify from where to serve the material.

9
00:00:46,260 --> 00:00:49,100
In our case, it is going to be example2.com.

10
00:00:49,110 --> 00:00:57,420
We will close this VirtualHost directive then third

11
00:00:57,420 --> 00:01:06,840
whole section 172.24.0.3 and ServerName is going to be 172.24.0.3 and from where we

12
00:01:06,840 --> 00:01:15,660
want to serve from example3, that mean we have to just create one section for each virtualhost.

13
00:01:15,900 --> 00:01:21,960
And the setting should be the IP address on which we want to listen for the request.

14
00:01:22,470 --> 00:01:29,010
And then from which directory, you are going to serve the material then just test the syntax whether

15
00:01:29,010 --> 00:01:32,400
it is ok or not, and then reload the service.

16
00:01:32,730 --> 00:01:35,040
And what is the meaning of this stanga?

17
00:01:35,580 --> 00:01:36,600
This section

18
00:01:36,960 --> 00:01:42,270
The first parameter is the start of virtual host section for 172.24.0.1.

19
00:01:42,630 --> 00:01:50,130
Then here it is going to contain your server IP, then here from where the content will be served.

20
00:01:50,310 --> 00:01:52,170
And this is the end of section.

21
00:01:52,320 --> 00:01:59,430
And please remember in the case of a name based virtual hosting, it was listening on the same.

22
00:01:59,460 --> 00:02:02,460
ip address mean here it was one one one.

23
00:02:02,730 --> 00:02:06,600
And here instead of IP addresses there, we were specifying the name.

24
00:02:06,810 --> 00:02:11,910
So this is the main configuration difference between your name based and IP based.
