Till now, we have seen how to launch a single website, then using virtualhost, name based virtualhosting
IP based virtual hosting
now we want to move toward the security.
now we want to discuss about host based security on apache that mean how to grant or deny access based
on IP address, network, hostname or domain.
So in our case, the lab is again going to be that we used in our IP based virtual hosting.
That means we have got three IP addresses one, two, three.
And our directories are example1, example2, example3 from where we are serving the material
and we will be using 10 and 20 system for our testing.
Our host based security, now for implementing host based security, we required one option that is called
Require, now require offers different ways to restrict access to your website or portion of your website.
It is not sometimes necessary that you have to control only the whole site.
Sometimes /admin is there company.
Information is there.
So you only want to block that admin that mean your site.
www.example1.com/admin that you want to block portion of your website also
and to enforce complex type of host based security.
We can also use the RequiredAll, RequireAny and RequireNone parameter.
We will see what is the meaning of all these.
when we will be giving you different examples.
Now access can be granted or denied based on your IP addresses, but you can specify the network
also.
You can specify the name of the systems also, or you can specify a grant or deny based on your domain
name.
also, please remember in older version of apache, instead of this, we used to use, allow, deny
and order directives.
But in new although you can use this, but it is not recommended practice.
So in our case we will be using this Require, RequireAll, RequireAny type of things.
And so we will be taking different cases, different type of situations, which system to block, which
not to block, and what directive we have to write in our httpd.config to implement Host based
security.