1
00:00:00,060 --> 00:00:07,940
let us see the demo for .htaccess file, so we will go to our master system, in master system.

2
00:00:08,820 --> 00:00:22,100
We are going to go into our /var/www/html/example1 directory.

3
00:00:22,830 --> 00:00:25,110
We will clear this with pwd.

4
00:00:25,170 --> 00:00:29,140
You can verify that we are in directory only one file is there.

5
00:00:30,240 --> 00:00:38,150
Now we are going to create .htaccess file, we can create it with your cat command.

6
00:00:38,160 --> 00:00:44,510
Also, the name of the file should be always should be .htaccess.

7
00:00:45,060 --> 00:00:50,280
Then we are going to specify that parameter, AuthType is.

8
00:00:53,670 --> 00:00:58,200
Basic, then you have got AuthName.

9
00:01:04,480 --> 00:01:05,830
we going to specify

10
00:01:08,110 --> 00:01:09,200
Restricted

11
00:01:10,060 --> 00:01:11,380
you can write anything.

12
00:01:11,950 --> 00:01:12,790
Restricted

13
00:01:15,020 --> 00:01:15,970
access.

14
00:01:18,410 --> 00:01:31,040
Then we are going to specify the name of the file AuthUserFile, then name of the file, that name

15
00:01:31,040 --> 00:01:41,060
of the file is /etc/httpd/webpass.

16
00:01:43,100 --> 00:01:47,990
This is the file name then we are going to specify Require user.

17
00:01:50,480 --> 00:02:00,450
in our case anntika and second user is your nanu.

18
00:02:03,260 --> 00:02:07,640
we are going to save this file with a ls command.

19
00:02:07,670 --> 00:02:09,140
It will not be visible.

20
00:02:09,140 --> 00:02:14,270
So we have to write ls -a because it shows you the hidden files also.

21
00:02:14,870 --> 00:02:23,720
Then we can verify that also how we are going to verify we can again open that is showing you all the

22
00:02:23,720 --> 00:02:24,350
4 lines.

23
00:02:25,160 --> 00:02:29,930
Then we have to edit the /etc/httpd/conf/httpd.conf file.

24
00:02:33,010 --> 00:02:43,720
so we will go to the end, so we are going to remove these lines because we do not need so

25
00:02:43,720 --> 00:02:48,250
instead of that what we are going to type, we are going to write one parameter.

26
00:02:49,390 --> 00:02:54,210
That means we will remove these things.

27
00:02:55,210 --> 00:02:58,320
So what we are going to we are going to make one entry.

28
00:02:58,750 --> 00:03:04,330
What is that entry AllowOver.

29
00:03:07,090 --> 00:03:07,680
ride.

30
00:03:10,330 --> 00:03:22,480
Spelling you have to AllowOverride then we are going to specify AuthConfig this is the setting

31
00:03:22,480 --> 00:03:31,080
that we are going to make in our file, again always a double verify whether your spelling are.

32
00:03:31,090 --> 00:03:34,320
OK, then please do not make changes.

33
00:03:34,340 --> 00:03:41,200
One another module is there, your route module is there.

34
00:03:41,230 --> 00:03:45,700
Let me show you, there is one setting this.

35
00:03:46,420 --> 00:03:51,130
Please do not make changes here because this will make your system vulnerable.

36
00:03:52,390 --> 00:03:59,050
So we will close this file, then we will view the last four lines.

37
00:04:01,260 --> 00:04:04,740
So we can check whether entries are okay or not.

38
00:04:07,380 --> 00:04:13,920
So these are our entries then what we are going to do, we are going to test with which command.

39
00:04:17,650 --> 00:04:28,180
this syntax is okay, then we are going to reload the restart this systemctl restart httpd.

40
00:04:29,590 --> 00:04:37,000
So now we have configured our system according to what are needed for that .htaccess
