1
00:00:00,460 --> 00:00:07,900
Now, let us verify whether name based virtual hosting is working properly from the client's C10

2
00:00:07,900 --> 00:00:15,250
C20, and then we will be also looking at what will happen if we are going to access by using the IP

3
00:00:15,250 --> 00:00:15,610
address.

4
00:00:15,880 --> 00:00:25,300
So first, let us go to our C10 system and we are going to check first host files, whether it is

5
00:00:25,300 --> 00:00:26,140
ok or not.

6
00:00:26,800 --> 00:00:35,080
So all the three entries are there regarding three sites, then we are going to say elinks --.

7
00:00:38,030 --> 00:00:46,820
dump http://www.example1.com.

8
00:00:49,720 --> 00:00:58,540
So we will see that it is showing welcome to example1 site.

9
00:01:00,700 --> 00:01:06,220
And when we are going, it is showing the different Web pages and we are going to open example,

10
00:01:06,220 --> 00:01:14,230
3.com, it is displaying the different page so that mean our name based virtual

11
00:01:14,230 --> 00:01:19,930
hosting is working properly and we will go to the C20 system, first.

12
00:01:19,930 --> 00:01:23,470
We are going to check this /etc/hosts files.

13
00:01:25,210 --> 00:01:26,230
It is OK.

14
00:01:27,070 --> 00:01:32,290
Then we are going to use elinks --dump.

15
00:01:34,270 --> 00:01:42,760
http://www.example1.com.

16
00:01:45,070 --> 00:01:45,970
It is working.

17
00:01:48,420 --> 00:01:49,920
We will open the second site.

18
00:01:50,170 --> 00:01:57,960
It is also working, three it is also working now we can check with the ping also.

19
00:01:58,020 --> 00:02:00,960
what address?

20
00:02:02,590 --> 00:02:08,980
it is returning ping -c1.

21
00:02:19,090 --> 00:02:20,950
Sorry we have written

22
00:02:24,610 --> 00:02:25,810
ping -c1 www.

23
00:02:30,790 --> 00:02:32,440
http, it is OK.

24
00:02:37,100 --> 00:02:39,560
So let us check our host file.

25
00:02:48,510 --> 00:02:51,980
So, Host file, where proper entries are there or not?

26
00:02:53,790 --> 00:03:03,870
So 172.24.0.1, it is ok, example1.com, it is OK, example2,

27
00:03:03,870 --> 00:03:05,180
.com it is OK.

28
00:03:07,690 --> 00:03:09,250
So what mistake we are making?

29
00:03:10,030 --> 00:03:13,780
Oh, sorry, we are just in Ping command.

30
00:03:13,810 --> 00:03:14,890
We are using the http.

31
00:03:15,760 --> 00:03:18,840
So ping c1 it is working.

32
00:03:21,560 --> 00:03:22,360
Let us check.

33
00:03:24,650 --> 00:03:36,560
c 2 it is working, then we are going to specify three it is also working now what will happen if

34
00:03:36,560 --> 00:03:45,080
we are going to use by using IP address, if we are going to access the sites by using your IP

35
00:03:45,080 --> 00:03:45,500
address?

36
00:03:46,460 --> 00:03:47,240
Let us see.

37
00:03:49,280 --> 00:03:54,890
http://172.24.0.1.

38
00:03:56,330 --> 00:03:59,990
It is showing you the first Web site.

39
00:04:00,470 --> 00:04:01,020
Why?

40
00:04:02,480 --> 00:04:13,700
Because the reason for that is if we are going to open tail -17, your httpd 

41
00:04:13,700 --> 00:04:14,820
configuration file.

42
00:04:16,100 --> 00:04:19,890
So let us see why it is showing you the first site.

43
00:04:21,270 --> 00:04:28,960
So because the first stanga refered to your example1.com site.

44
00:04:29,300 --> 00:04:32,660
So that is why it is displaying this suppose.

45
00:04:32,660 --> 00:04:39,290
If you want to display this second site by default, if somebody is going to use my address.

46
00:04:39,620 --> 00:04:44,220
So what you can do, you can put this stanga in the first place.

47
00:04:44,540 --> 00:04:47,950
So if we are going to access by using the IP address.

48
00:04:48,320 --> 00:04:57,500
So the first, that your stanga of instruction will be fist virtual host settings.

49
00:04:58,100 --> 00:04:59,290
They will be displayed.

50
00:04:59,960 --> 00:05:07,040
So we are able to now test everything from our master system.

51
00:05:07,040 --> 00:05:14,400
Also C10 also, C20, our virtual hosting name based virtual hosting is working properly.

52
00:05:14,840 --> 00:05:23,810
So that is Named based Virtual hosting in which what we did, we launched three Web sites on single address

53
00:05:24,200 --> 00:05:28,250
and for resolving the name to IP address.

54
00:05:28,250 --> 00:05:36,980
We made the entries in the host file and we created a material for different websites in different

55
00:05:37,130 --> 00:05:39,560
directories in /var/www.

56
00:05:39,570 --> 00:05:47,830
/html, we created example1, example2, and example3 and we put there one default index.html page.

57
00:05:48,440 --> 00:05:57,110
Then on client side, we tested by using the elinks browser and by specifying the name of the site.

58
00:05:57,470 --> 00:06:00,070
So all sites were working properly.

59
00:06:00,230 --> 00:06:02,300
That is our name based virtual hosting.
