On Sat, 28 Nov 1998, Dani wrote:
> Now that we are talking about configuration. I think it could be nice to
> be able to say in the configuration file (not in the directives definition,
> but in the actual httpd.conf) something like:
> 
> <class RestrictedDir>
>    order allow, deny
>    deny from all
>    allow from .my.network.com
> </class>
> 
> 
> and then be able to say
> 
> <directory Dir1>
>    inherit RestrictedDir
>    My particular options here...
> </directory>
> 
> 
> <directory Dir2>
>    inherit RestrictedDir
>    My particular options here...
> </directory>
> 
> So we can create classes for directories, locations, etc.
> We could even create a class for websites and then inherit it and change what
> we would like to change/customize. Changes in the base class would be
> propagated instead of having to go site by site or directory per directory
> changing the same parameters

This is something that CERN had that I always thought would be very very
useful, but never got around to implement it (it is quite non-trival to
do).

You can emulate it (not very satisfactorally) by using "Include" inside
the <Directory> sections. Perhaps better approach would be to allow for
"user-defined" directives or macros, such as

<DefineMacro RestrictRemoteUsers>
  order ...
  deny ...
  allow ...
</DefineMacro>

which can then be used by name:

<Directory>
  UseMacro RestrictRemoteUsers
</Directory>

This could the be used for grouping any directives that may need to be
repeated.

This should really be discussed on new-httpd, though, since this is about
altering the Apache configuration language itself, rather than layering
a GUI on top of what is already available.

Paul
--
Paul Sutton, C2Net Europe                    http://www.eu.c2.net/~paul/
Editor, Apache Week .. the latest Apache news http://www.apacheweek.com/

Reply via email to