Now let us see the demo of case one, so we are going to make changes in httpd.config file.
So let us go to our Master, so we are going to clear the screen.
We are going to our master system and we are going to open the file.
Your configuration, apache configuration file, /etc/httpd/conf/httpd.config.
We will go to the end.
So already virtualhost entries are there.
We will not disturb those entries.
So we are going to make new entries.
So what will be the first entry that mean
We are going to use the directive Directory.
So we are going to specify /var/www/html/ then the name of the directory example1, we are going to close
this, then we are going to specify Required.
all denied then what we are going to do, we are going to close this.
Directive,
then we will copy paste.
We are going to copy paste all three lines.
So we are going to paste.
So now we are going to control the second.
That means we are going to make the entries, as we have discussed.
So now here we are going to say it should specify it should satisfy all the requirement.
So we are going to specify it Require.
All then we are going to make entry Require.
IP 172.24.0.0/16 then we are going to specify the Require.
not ip 172.24.0.10, then we are going to close this RequireAll.
Then let us check.
That means let us veryify, directory entries are ok.
RequireAll denied then directive parameters on second example2.com Required that mean we have
made entries according to what we have discussed.
So let us check this also.
So we are going to display last few lines.
So it is displaying, so let us test also service httpd configtest, it is recommended to run
this command.
So it is showing some error that Required parameter.
Some error is there.
It is not required.
It is Require.
So let us change that mean always.
testing the Syntex, it will show you the errors that are there.
So What is the error that it is not Required.
It is Require.
Sometimes you should purposefully introduce the error so that you are able to verify how to troubleshoot
that also.
So so now we have changed the parameter again.
Let us again check.
Your.
So now the parameters Required all denied, let us check this syntax it is OK then what we are
going to say systemctl.
reload httpd.
Now, we are going to verify that also.