1
00:00:00,210 --> 00:00:07,670
How to enable that per-user web directory concept, so you have to enable one option,

2
00:00:07,680 --> 00:00:10,850
enable "UserDir public_html" directive.

3
00:00:11,250 --> 00:00:13,540
You have to enable that.

4
00:00:13,890 --> 00:00:20,620
Now, please remember, in earlier version of http this directive was in httpd.config file itself,

5
00:00:20,640 --> 00:00:23,990
but now they have moved it into some other files.

6
00:00:24,000 --> 00:00:27,510
So let us look, where is that file and which changes we have to make?

7
00:00:27,930 --> 00:00:34,980
So what we have to do enable UserDir support for public_html directory based websites so that user

8
00:00:34,980 --> 00:00:44,340
can access their websites, in which manner http://172.24.0.1/~ then name of the user here.

9
00:00:44,520 --> 00:00:50,820
In this case, we want nanu user to host his Website so that others can view his site by specifying

10
00:00:50,820 --> 00:00:57,480
which address ip address and this ~nanu by specify nanu.

11
00:00:57,570 --> 00:01:03,630
They should be able to view the website of nanu and if they want to view the website of Vipin, they

12
00:01:03,660 --> 00:01:06,460
have to just change this from nanu to vipin.

13
00:01:07,200 --> 00:01:10,520
So first we have to locate where we have to make these changes.

14
00:01:11,010 --> 00:01:19,560
So first of all, what we will do, we will grep this file, httpd.config and we will try to search

15
00:01:19,560 --> 00:01:26,930
one parameter that is include when we are specifying include that mean it is showing many things in

16
00:01:27,270 --> 00:01:34,680
include conf.modules.d and then it is showing optional, that mean now they have made that

17
00:01:34,680 --> 00:01:40,220
httpd.conf file little bit smaller because earlier it was very big.

18
00:01:40,680 --> 00:01:49,650
So when we restart the web server, so what it does, it first read that httpd.config, then

19
00:01:49,650 --> 00:01:56,330
also those files which are included so that when it is going to read the file, which are present in

20
00:01:56,340 --> 00:02:02,910
this directory also and this directory also which file which ends with the conf.

21
00:02:03,820 --> 00:02:09,880
But here we want to see which file is important for enabling per user directory.

22
00:02:10,810 --> 00:02:14,320
So now, again, we are going to search for one another parameter.

23
00:02:14,320 --> 00:02:19,820
That is ServerRoot, it is going to show us where all these important files are there.

24
00:02:20,440 --> 00:02:28,300
So when we specify the ServerRoot, it will show us that this /etc/httpd  directory contains all

25
00:02:28,300 --> 00:02:29,860
the other critical files.

26
00:02:30,190 --> 00:02:38,470
And that additional to that httpd.config file.

27
00:02:38,980 --> 00:02:46,690
So we will go to this /etc/httpd directory and we will use the ls and we will find that conf

28
00:02:46,690 --> 00:02:47,260
directory is there.

29
00:02:47,530 --> 00:02:48,810
where our httpd.

30
00:02:48,830 --> 00:02:55,320
.config file is there, then conf.d is there, then conf.module is there.

31
00:02:55,600 --> 00:02:58,240
Then we will move to this conf directly.

32
00:02:58,810 --> 00:03:02,370
And here when we will list, we will find many files.

33
00:03:02,740 --> 00:03:06,280
But for us, the interesting file is user directory.

34
00:03:06,820 --> 00:03:10,670
So we will view this file and make changes in this file.

35
00:03:11,110 --> 00:03:19,540
So when we are going to view this file, you will see that here user directory is disabled and this user

36
00:03:19,540 --> 00:03:24,670
parameter is commented.

37
00:03:25,090 --> 00:03:31,450
So what we are going to do, we are going to change, we will disable this and we will uncommented this.

38
00:03:31,810 --> 00:03:33,690
That means user directory public_html.

39
00:03:33,760 --> 00:03:34,930
What is the meaning of that?

40
00:03:35,330 --> 00:03:42,750
That means if the user wants to create their website, but they have to do in their home directory

41
00:03:43,120 --> 00:03:47,210
they have to create one public_html directory.

42
00:03:47,410 --> 00:03:52,440
then put index.html there then only.

43
00:03:52,450 --> 00:03:56,290
So that is why we have we have to configure this parameter.

44
00:03:56,620 --> 00:04:02,890
So what we are going to do, we are going to put comment before the UserDir disable parameter

45
00:04:03,040 --> 00:04:04,420
and uncommented this.

46
00:04:04,900 --> 00:04:08,830
Then we are going to reload our http server.

47
00:04:09,100 --> 00:04:15,070
Then we will see whether the user is able to implement that web directory or not.
