[ale] Apache

Björn Gustafsson bg-ale at bjorng.net
Mon May 29 14:16:39 EDT 2006


If you look at the httpd.conf file, you will probably see at least
some sample <Location> blocks.  These will typically include
allow/deny pairs.

For example:

<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    allow from 127.0.0.1
    allow from 192.168.0
</Location>

That allows the path /server-status to be accessed *only* from the
loopback IP and from the 192.168.0.0/24 subnet.  In the case of a
typical location, you wouldn't need the SetHandler phrase -- that
redirects the path /server-status to a special internal handler.

You can also put limits on <Files> and <Directory> entries if you
like, with similar effects.

Doing this will elicit a "forbidden" response from the server for
anyone who doesn't match the magic IPs. If you truly want it to not
respond at all, then you need to address this at a lower level, e.g.
with firewall rules.

On Mon, 2006-05-29 at 00:34 -0400, Terry Bailey wrote:
>
> Can Apache be set up to only respond to a client with a particular IP address?
>
> Thanks,
>
> Terry Bailey

-- 
Bj?rn Gustafsson



More information about the Ale mailing list