Let us change the DirectoryIndex and see what happens.
So we will go to the master system and we will open that, find the configuration file /etc/httpd/conf/httpd.conf.
And there what we are going to change, we are going to change the value of DirectoryIndex.
So we will look at where our DirectoryIndex and we will include that value also.
So this is the file DirectoryIndex, so we will.
i.html, so we will make the changes, escape because we are using the Vi editor, so whenever we are
saving, we have to specify :WQ and we want to save that file.
So we will clear this screen and now we can search with that grep directive also that mean we want
to see whether we have made the changes properly or not, so you can send that output to grep, then you
can specify -A5 that mean show after searching that string, display that string also plus
five lines after that line.
So here we are going to specify Carrot.
Then we are going to specify hash and then Directory.
Index.
So it is showing us the changes that we made, then we are going to test.
service httpd configtest, Whether syntax is OK or not.
syntax is OK, so we can what command we can run, we can run
systemctl httpd sorry
reload.
httpd.
Then we can go to our client 10 system and we can check whether we are getting now index that mean now when
clients send request to Web server, the Web server reads the DirectoryIndex directive, it finds
first index.html then i.html now in our case, in /var/www/html directory
i.html file is there.
So it is going to display that file.
So we successfully change that DirectoryIndex.
Now it is displaying that page, which is contained in i.html.