Now, let us go to our master system and modify this httpd.config file according to the way we
have discussed.
So we will go to our system, on master system and we are going to open that configuration file
httpd.conf.
We are going to open this file, we will go to the end, and here we are going to make changes.
So this NameVirtualHost, this line is not required.
So we are going to delete this line.
So here it is, OK.
The first Stanga.
So here what we are going to specify.
We are going to specify the IP address, 172.24.0.1, now the second section.
the ip address is two, and ServerName is going to be 172.24.0.2, and then here your
third section, it will listen on ip address three.
And here also we have to specify the ip address as 172.24.0.3.
So we will.
save and then, we can verify that also whether settings are ok or not, so tail you can specify the
number of lines you want to open tail -15.
It is going to show us that 15, last 15 line of the file.
So it is showing us, let us again check whether everything is okay.
VirtualHost one, two, three and addresses are serverName one, two, three.
And from which directory it is serving example1, example2, and example3.
Then what we are going to say service httpd configtest.
it is OK, then we are going to say service.
reload httpd.
Sorry, again, we have made some mistake, which command we are going to run systemctl.
So this is the way we have created a virtual host, we have made the settings in the file, then we
have restarted the service.
Now we will be testing whether our virtual hosting is working properly.
IP based virtual hosting is working properly or not.