[PLUG] Apache Directory Directive

Jeme A Brelin jeme at brelin.net
Thu Apr 15 01:49:02 UTC 2004


(Assuming Apache 1.3)

On Wed, 14 Apr 2004 dan at fiddlers-green.info wrote:
> I'm trying to limit access to a logs directory on my webserver, and I
> can't seem to get the following to work:
>
> <Directory /var/webconfig/htdocs/reports/data>
>     Options Indexes FollowSymLinks
>     order deny,allow

>From the documentation under "Configuration Files":
  Directives in the configuration files are case-insensitive, but
  arguments to directives are often case sensitive.

So perhaps you would like that to read "order Deny,Allow" or, for
readability, "Order Deny,Allow".

>     deny from all
>     allow from 192.168.2.*

This isn't shell expansion or regex, so your * means nothing.  The syntax
is flexible, but they didn't bother to put in support for every imaginable
scheme of shorthand.

A full or partial domain name
An IP address
A partial IP address
A network/mask pair
A network/bit CIDR spec

So you want one of the following three:
Allow from 192.168.2
Allow from 192.168.2.0/255.255.255.0
Allow from 192.168.2.0/24

(I ignored the obvious and impractical explicit lists of each subset.)

> Unfortunately everyone still gets denied access. I'm under the
> impression if I remove the "deny from all" statement, then anyone will
> get access. I would like to give access to only my local subnet.

Clear as vodka, sir.  Fix that and see.

J.
-- 
   -----------------
     Jeme A Brelin
    jeme at brelin.net
   -----------------
 [cc] counter-copyright
 http://www.openlaw.org




More information about the PLUG mailing list