1
00:00:00,090 --> 00:00:05,860
Now let us see the demo of case one, so we are going to make changes in httpd.config file.

2
00:00:06,360 --> 00:00:11,310
So let us go to our Master, so we are going to clear the screen.

3
00:00:11,320 --> 00:00:15,600
We are going to our master system and we are going to open the file.

4
00:00:17,070 --> 00:00:32,360
Your configuration, apache configuration file, /etc/httpd/conf/httpd.config.

5
00:00:33,120 --> 00:00:34,250
We will go to the end.

6
00:00:35,430 --> 00:00:37,830
So already virtualhost entries are there.

7
00:00:37,860 --> 00:00:40,350
We will not disturb those entries.

8
00:00:40,830 --> 00:00:43,200
So we are going to make new entries.

9
00:00:44,040 --> 00:00:47,070
So what will be the first entry that mean

10
00:00:47,610 --> 00:00:55,570
We are going to use the directive Directory.

11
00:00:56,340 --> 00:01:10,200
So we are going to specify /var/www/html/ then the name of the directory example1, we are going to close

12
00:01:10,200 --> 00:01:16,290
this, then we are going to specify Required.

13
00:01:19,490 --> 00:01:27,920
all denied then what we are going to do, we are going to close this.

14
00:01:31,110 --> 00:01:31,860
Directive,

15
00:01:35,070 --> 00:01:36,600
then we will copy paste.

16
00:01:40,140 --> 00:01:42,510
We are going to copy paste all three lines.

17
00:01:45,510 --> 00:01:46,860
So we are going to paste.

18
00:01:50,200 --> 00:01:52,420
So now we are going to control the second.

19
00:01:55,070 --> 00:01:58,160
That means we are going to make the entries, as we have discussed.

20
00:01:58,730 --> 00:02:07,550
So now here we are going to say it should specify it should satisfy all the requirement.

21
00:02:08,150 --> 00:02:11,720
So we are going to specify it Require.

22
00:02:15,070 --> 00:02:21,190
All then we are going to make entry Require.

23
00:02:25,680 --> 00:02:39,060
IP 172.24.0.0/16 then we are going to specify the Require.

24
00:02:42,380 --> 00:02:59,150
not ip 172.24.0.10, then we are going to close this RequireAll.

25
00:03:01,830 --> 00:03:03,090
Then let us check.

26
00:03:09,850 --> 00:03:14,070
That means let us veryify, directory entries are ok.

27
00:03:16,370 --> 00:03:25,100
RequireAll denied then directive parameters on second example2.com Required that mean we have

28
00:03:25,130 --> 00:03:28,300
made entries according to what we have discussed.

29
00:03:29,120 --> 00:03:32,500
So let us check this also.

30
00:03:34,550 --> 00:03:39,320
So we are going to display last few lines.

31
00:03:43,720 --> 00:03:57,550
So it is displaying, so let us test also service httpd configtest, it is recommended to run

32
00:03:57,550 --> 00:03:58,140
this command.

33
00:03:59,710 --> 00:04:03,430
So it is showing some error that Required parameter.

34
00:04:03,430 --> 00:04:05,130
Some error is there.

35
00:04:05,920 --> 00:04:07,380
It is not required.

36
00:04:07,390 --> 00:04:08,080
It is Require.

37
00:04:08,110 --> 00:04:11,160
So let us change that mean always.

38
00:04:11,170 --> 00:04:19,970
testing the Syntex, it will show you the errors that are there.

39
00:04:20,560 --> 00:04:23,890
So What is the error that it is not Required.

40
00:04:24,290 --> 00:04:26,680
It is Require.

41
00:04:28,890 --> 00:04:36,730
Sometimes you should purposefully introduce the error so that you are able to verify how to troubleshoot

42
00:04:36,810 --> 00:04:37,200
that also.

43
00:04:37,530 --> 00:04:41,360
So so now we have changed the parameter again.

44
00:04:43,710 --> 00:04:45,450
Let us again check.

45
00:04:48,620 --> 00:04:49,350
Your.

46
00:04:56,230 --> 00:05:04,240
So now the parameters Required all denied, let us check this syntax it is OK then what we are

47
00:05:04,240 --> 00:05:06,850
going to say systemctl.

48
00:05:10,090 --> 00:05:14,450
reload httpd.

49
00:05:18,970 --> 00:05:21,160
Now, we are going to verify that also.
