How to enable that per-user web directory concept, so you have to enable one option,
enable "UserDir public_html" directive.
You have to enable that.
Now, please remember, in earlier version of http this directive was in httpd.config file itself,
but now they have moved it into some other files.
So let us look, where is that file and which changes we have to make?
So what we have to do enable UserDir support for public_html directory based websites so that user
can access their websites, in which manner http://172.24.0.1/~ then name of the user here.
In this case, we want nanu user to host his Website so that others can view his site by specifying
which address ip address and this ~nanu by specify nanu.
They should be able to view the website of nanu and if they want to view the website of Vipin, they
have to just change this from nanu to vipin.
So first we have to locate where we have to make these changes.
So first of all, what we will do, we will grep this file, httpd.config and we will try to search
one parameter that is include when we are specifying include that mean it is showing many things in
include conf.modules.d and then it is showing optional, that mean now they have made that
httpd.conf file little bit smaller because earlier it was very big.
So when we restart the web server, so what it does, it first read that httpd.config, then
also those files which are included so that when it is going to read the file, which are present in
this directory also and this directory also which file which ends with the conf.
But here we want to see which file is important for enabling per user directory.
So now, again, we are going to search for one another parameter.
That is ServerRoot, it is going to show us where all these important files are there.
So when we specify the ServerRoot, it will show us that this /etc/httpd directory contains all
the other critical files.
And that additional to that httpd.config file.
So we will go to this /etc/httpd directory and we will use the ls and we will find that conf
directory is there.
where our httpd.
.config file is there, then conf.d is there, then conf.module is there.
Then we will move to this conf directly.
And here when we will list, we will find many files.
But for us, the interesting file is user directory.
So we will view this file and make changes in this file.
So when we are going to view this file, you will see that here user directory is disabled and this user
parameter is commented.
So what we are going to do, we are going to change, we will disable this and we will uncommented this.
That means user directory public_html.
What is the meaning of that?
That means if the user wants to create their website, but they have to do in their home directory
they have to create one public_html directory.
then put index.html there then only.
So that is why we have we have to configure this parameter.
So what we are going to do, we are going to put comment before the UserDir disable parameter
and uncommented this.
Then we are going to reload our http server.
Then we will see whether the user is able to implement that web directory or not.