Now, sometimes you wonder why we created the file name as index.html not some other file like abc.html.
Now this parameter, which file we are going to create for the home page initially that will be decided
by the DirectoryIndex directive, DirectoryIndex directive will decide which file will be searched in what
order to be delivered to the client.
So if we are going to view our httpd.config file and if we will see what our directive Directory
index is contains you, we will see that here.
One value is their
index.html.
That is why we created our first file as index.html.
So in this directive what is included index.html is included in this directive.
That is why we created the main file with the name index.html.
That mean if you are going to have some other name your file, then you have to add that name here so
that the DirectoryIndex will decide which is the name of your first file.
So in our case, we will view this.
What is the value of that by sending the output to grep command and then we will try to search this
string carrot.
And this is the string that we are going to search and we will see that, display that line also
plus after five lines also.
So we will be looking at, and no need to give this grep search, also you can open this file with the vi editor
and find out where is the DirectoryIndex.
So we will be seeing the both.
So let us go to the master system and in master system, let us try to find out what is the,
directive of that.
So we will open that file and we will say that A5 and we want to search the symbol is carrot.
mean beginning of line.
Then we are going to specify the value that we want to search.
That is hash space DirectoryIndex.
So what it is showing that by default, your file is, DirectoryIndex value is
index.html.
That is why we created our initial file as an index.
html.
Let us show us when we created the file in which directly we created the file, that that /var/www/html directory.
What was the name of the file that was index.html.
And you can open and view that DirectoryIndex option in this way also.
So we will open with the vi editor and we will look at where is our parameter.
So we will scroll down.
So we will try to find out where is our DirectoryIndex directive is.
So this is a very large file, so this is DirectoryIndex index.html, so we will quit that
file.
So that mean our DirectiveIndex directive is going to decide, which page by default will
be sent to the clients.