httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michele Petrovsky <petro...@voicenet.com>
Subject Re: More thoughts
Date Sat, 28 Nov 1998 19:25:40 GMT
At 06:14 PM 11/28/98 +0000, Paul wrote:
>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.
>

>From my point of view as a user/sysadmin (of a very
basic implementation)/tech writer (I always have in
the back of my mind the question "How easy would it
be to explain this point to people who lack a strong
Unix/Apache/programming background?), I like both
Dani's suggestion re: creating/inheriting classes
for directories, locations, etc., and Paul's
response re: allowing for user-defined directives.
Techniques like these would not only make configuring
Apache more flexible, but would make it and its
GUIs easier to explain to the Unix- or C-challenged.

I'm not sure that implementing either Dani's or Paul's
suggestions would in the strictest sense alter the
Apache configuration language.  At least, that language's
basic structure and logic needn't be changed.  But in
any case, I'll cc this to new-httpd, since I lurk there too.

Michele Petrovsky





Mime
View raw message