1
00:00:00,940 --> 00:00:07,570
now, we are going to edit the apache configuration file, the name of that file is httpd.config now

2
00:00:07,570 --> 00:00:08,290
in that file.

3
00:00:08,320 --> 00:00:14,800
What we are going to do, we are going to add one directory, the name of the directory is ServerName.

4
00:00:14,800 --> 00:00:20,370
172.24.0.1 where 172.24.

5
00:00:20,380 --> 00:00:26,230
0.1 is the IP address on which Web server will be implemented, because sometimes what happened

6
00:00:26,230 --> 00:00:29,660
on your system, there could be more than one address.

7
00:00:29,950 --> 00:00:36,640
So here we are going to specify that mean on which IP address we want to listen.

8
00:00:36,760 --> 00:00:40,870
That mean on which IP address our web server.

9
00:00:40,870 --> 00:00:46,430
will be handling the request that client have to connect which IP address.

10
00:00:46,900 --> 00:00:50,950
So here we are going to specify the parameters servername.

11
00:00:51,250 --> 00:00:55,180
In our case, we are going to launch it on 172.24.0.1.

12
00:00:56,240 --> 00:01:04,330
And if you are not going to specify this servername directory, what will happen if this master system is going

13
00:01:04,330 --> 00:01:06,070
to have three addresses

14
00:01:06,310 --> 00:01:12,400
Then your apache will be listening on all the three, that mean it will be serving the Web page on all

15
00:01:12,400 --> 00:01:12,610
the addresses.

16
00:01:12,610 --> 00:01:20,380
so in our case, we are going to specify the servername directory as directive as 172.24

17
00:01:20,380 --> 00:01:20,970
0.1.

18
00:01:21,640 --> 00:01:29,950
And we will be editing this file by using the Vi editor, and we will open this file in vi editor and we

19
00:01:29,950 --> 00:01:32,740
are going to configure this option.

20
00:01:33,280 --> 00:01:43,030
And please remember that mean Vi editor, it is not necessary that you have to use the Vi editor. You can use

21
00:01:43,330 --> 00:01:44,800
a nano editor also.

22
00:01:44,980 --> 00:01:52,150
But in our case or in my case, I will be using the Vi editor and then later on after when we have made

23
00:01:52,150 --> 00:01:58,600
the changes, what we are going to do, we will check that also, how we are going to check the command

24
00:01:58,600 --> 00:02:03,480
is cat the name of the file and we will be using one grep option.

25
00:02:03,640 --> 00:02:07,240
And please remember, in this course, we will be using lot of time.

26
00:02:07,690 --> 00:02:09,900
We will be using the grep.

27
00:02:09,910 --> 00:02:10,330
command.

28
00:02:10,330 --> 00:02:12,610
grep command is used for searching the file.

29
00:02:13,240 --> 00:02:19,690
And when we specify this carrot symbol, we are saying that in the beginning of line.

30
00:02:20,170 --> 00:02:23,240
This keyword should be the there this string should be there.

31
00:02:23,800 --> 00:02:29,680
So now we want to search in that file if there is any line.

32
00:02:30,700 --> 00:02:32,440
Which start with servername.

33
00:02:32,510 --> 00:02:40,340
Please show us so in our case, what it is going to show us, it is going to show us servername 172.24.0.

34
00:02:40,450 --> 00:02:40,810
1.

35
00:02:41,470 --> 00:02:49,360
And sometimes what we want, we want that this line should be displayed or certain previous line

36
00:02:49,360 --> 00:02:51,640
or after line should be also display.

37
00:02:51,910 --> 00:03:01,330
So we can use the, one parameter or one option -B1 mean before one that mean

38
00:03:01,780 --> 00:03:04,770
just show us one line before that also.

39
00:03:05,020 --> 00:03:08,290
And if I am going to say -A1 what it is going to say.

40
00:03:08,710 --> 00:03:09,100
Show.

41
00:03:09,100 --> 00:03:12,070
One line after that string also.

42
00:03:12,490 --> 00:03:21,400
So we will be making a lot of use of the grep because showing this http file full in slides

43
00:03:21,400 --> 00:03:22,030
or.

44
00:03:22,280 --> 00:03:25,420
It is very difficult because this file is very large.

45
00:03:25,420 --> 00:03:27,610
So we will be using a lot of grep command.

46
00:03:28,150 --> 00:03:35,170
And this is by pipe symbol, that mean we are sending the output to grep symbol and we are saying that please

47
00:03:35,170 --> 00:03:39,290
search this string so it will show us that everything is OK.

48
00:03:39,730 --> 00:03:45,730
So now we are going to make these changes because we want our Apache Web server to listen on this.

49
00:03:46,000 --> 00:03:46,260
Uh.
