Let us create that new.html file and make changes in httpd.config file.
So we will go to our master system, in master system.
currently we are in this directory.
So what we are going to do.
We will move one.
hand back then, we will go into example1.
that mean now we are in this directory, with ls command we can view the name
of our file.
It is index.html.
So we are going to create one new file.
We will name it as new.html.
Here we are going to type "redirect to new page"
We are going to save, with ls we are going to view.
We have got now two pages index.html
new.html, then we are going to open this file httpd/conf/
httpd.conf.
We will go at the end so what we are going to do.
We will go to the first stanza.
That mean, in our case, this stanza, these all four settings are OK.
So here we are going to insert one another line.
What we are going to say Redirect.
permanent other option could be temporarily permanent.
Which page we have to redirect if somebody is going to access index.html then please redirect it into
http://172.24.0.1
/new.html.
So Redirects it.
This option is useful when your resource has moved, so we can make the entry.
So we are going to save this and then we can view this also.
tail.
We are going to view certain lines.
So let us increase the lines.
So, again, it is not displaying the host about the first information, so let us again increase it into
let us say -25.
That it is showing this stanza, VirtualHost this?
This was the setting.
Now what we are going to do, we are going to test with which command service httpd
configtest syntax is.
Okay.
Then what we are going to do system.
ctl reload
because we are making the changes in httpd.config, so it is recommended practice, or you have to because
we are making the changes, so we have to reload or restart our httpd server.
So we are starting the httpd.
So we have made the changes created file according to what we have discussed.