now, we are going to edit the apache configuration file, the name of that file is httpd.config now
in that file.
What we are going to do, we are going to add one directory, the name of the directory is ServerName.
172.24.0.1 where 172.24.
0.1 is the IP address on which Web server will be implemented, because sometimes what happened
on your system, there could be more than one address.
So here we are going to specify that mean on which IP address we want to listen.
That mean on which IP address our web server.
will be handling the request that client have to connect which IP address.
So here we are going to specify the parameters servername.
In our case, we are going to launch it on 172.24.0.1.
And if you are not going to specify this servername directory, what will happen if this master system is going
to have three addresses
Then your apache will be listening on all the three, that mean it will be serving the Web page on all
the addresses.
so in our case, we are going to specify the servername directory as directive as 172.24
0.1.
And we will be editing this file by using the Vi editor, and we will open this file in vi editor and we
are going to configure this option.
And please remember that mean Vi editor, it is not necessary that you have to use the Vi editor. You can use
a nano editor also.
But in our case or in my case, I will be using the Vi editor and then later on after when we have made
the changes, what we are going to do, we will check that also, how we are going to check the command
is cat the name of the file and we will be using one grep option.
And please remember, in this course, we will be using lot of time.
We will be using the grep.
command.
grep command is used for searching the file.
And when we specify this carrot symbol, we are saying that in the beginning of line.
This keyword should be the there this string should be there.
So now we want to search in that file if there is any line.
Which start with servername.
Please show us so in our case, what it is going to show us, it is going to show us servername 172.24.0.
1.
And sometimes what we want, we want that this line should be displayed or certain previous line
or after line should be also display.
So we can use the, one parameter or one option -B1 mean before one that mean
just show us one line before that also.
And if I am going to say -A1 what it is going to say.
Show.
One line after that string also.
So we will be making a lot of use of the grep because showing this http file full in slides
or.
It is very difficult because this file is very large.
So we will be using a lot of grep command.
And this is by pipe symbol, that mean we are sending the output to grep symbol and we are saying that please
search this string so it will show us that everything is OK.
So now we are going to make these changes because we want our Apache Web server to listen on this.
Uh.