httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grand Apeiron <>
Subject Re: [users@httpd] How to create a "hosts deny" list for Apache
Date Thu, 13 Jan 2005 11:05:31 GMT
On Thu, 2005-01-13 at 10:38 +0000, JM Fraser wrote:
> Eric, do you have an example script that I could modify, or a site where I
> could get info? I don't want to end up terminating all httpd requests in
> error!

You only need a script if you want to modify the access list in an
automatic way.
The basic thing to deny/allow access to your site is the .htaccess file

To deny access to everyone by default and only allow access for some
specific hosts/subnets your .htaccess file would look like:

Order deny,allow

Deny From All
Allow From x.x.x.x
Allow From x.x.x.x

So, one "Allow From" line for every host or subnet you want to allow
your site.

You may read the documentation for the <Directory> directive in the
apache2 docs.

Grand Apeiron

If I would be a tapeworm, I would prefer penguins.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message