1
00:00:00,570 --> 00:00:03,430
Let us change the DirectoryIndex and see what happens.

2
00:00:03,810 --> 00:00:16,170
So we will go to the master system and we will open that, find the configuration file /etc/httpd/conf/httpd.conf.

3
00:00:18,960 --> 00:00:24,270
And there what we are going to change, we are going to change the value of DirectoryIndex.

4
00:00:25,250 --> 00:00:31,640
So we will look at where our DirectoryIndex and we will include that value also.

5
00:00:32,930 --> 00:00:39,020
So this is the file DirectoryIndex, so we will.

6
00:00:41,090 --> 00:00:51,590
i.html, so we will make the changes, escape because we are using the Vi editor, so whenever we are

7
00:00:51,590 --> 00:00:57,580
saving, we have to specify :WQ and we want to save that file.

8
00:00:58,640 --> 00:01:07,520
So we will clear this screen and now we can search with that grep directive also that mean we want

9
00:01:07,520 --> 00:01:18,680
to see whether we have made the changes properly or not, so you can send that output to grep, then you

10
00:01:18,680 --> 00:01:27,190
can specify -A5 that mean show after searching that string, display that string also plus

11
00:01:27,410 --> 00:01:30,030
five lines after that line.

12
00:01:30,590 --> 00:01:33,860
So here we are going to specify Carrot.

13
00:01:35,490 --> 00:01:42,360
Then we are going to specify hash and then Directory.

14
00:01:45,330 --> 00:01:46,170
Index.

15
00:01:47,730 --> 00:01:53,020
So it is showing us the changes that we made, then we are going to test.

16
00:01:53,430 --> 00:02:02,850
service httpd configtest, Whether syntax is OK or not.

17
00:02:04,750 --> 00:02:12,460
syntax is OK, so we can what command we can run, we can run

18
00:02:12,850 --> 00:02:20,080
systemctl httpd sorry

19
00:02:24,000 --> 00:02:24,690
reload.

20
00:02:26,970 --> 00:02:28,780
httpd.

21
00:02:30,450 --> 00:02:41,970
Then we can go to our client 10 system and we can check whether we are getting now index that mean now when

22
00:02:42,210 --> 00:02:51,690
clients send request to Web server, the Web server reads the DirectoryIndex directive, it finds

23
00:02:51,690 --> 00:02:59,420
first index.html then i.html now in our case, in /var/www/html directory

24
00:02:59,460 --> 00:03:01,850
i.html file is there.

25
00:03:02,070 --> 00:03:04,650
So it is going to display that file.

26
00:03:05,160 --> 00:03:09,180
So we successfully change that DirectoryIndex.

27
00:03:09,360 --> 00:03:15,810
Now it is displaying that page, which is contained in i.html.
