httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: thoughts on a new config language
Date Tue, 26 Aug 1997 04:05:27 GMT
Scopes also give you the ability to add new fun fields to features without
doing crap like TAKE123 and having three different forms of the same
command.  Like:

    mod_log_config {
	log {
	    filename "logs/access_log1";
	};

	log {
	    filename "logs/access_log2";
	    format "%this %that";
	};

	log {
	    filename "logs/access_log3";
	    format "%this %that";
	    buffering on;
	};
    }

versus:

    CustomLog logs/access_log1
    CustomLog logs/access_log2 "%this %that"
    CustomLog logs/access_log3 "%this %that" buffered

now imagine we add one more parameter to logs in the next revision ... I
think it's easier with scopes to add that parameter in a manner that makes
the configuration file self-documenting.

Heck, I probably got the CustomLog directive wrong there, the first
two fields might be swapped, I dunno.  I'd have to go look in the
documentation.  But with scopes I probably wouldn't have to because
it wouldn't matter the order of those two directives within the
log scope.

Dean

On Mon, 25 Aug 1997, Brian Behlendorf wrote:

> At 08:21 PM 8/22/97 -0700, Dean Gaudet wrote:
> >I'm trying to introduce scoping.  A module-name introduces a scope in
> >which all of the directives for that module are valid.  A directive
> >can introduce a scope in which its subdirectives are valid.
> >
> >It seems possible to make scoping optional provided there is no ambiguity.
> >That is, provided no two modules define the directive buffered-logs
> >then you could use buffered-logs without a scope.  But as soon as two
> >modules define buffered-logs then any use of the token "buffered-logs"
> >would be an error unless it was scoped.
> 
> The only place I see real benefit for this is in modules which implement
> the same features in different ways; for example, the mod_auth_* directives
> could all have a common set of second-level directives like "passwdfile"
> "groupfile" etc.  Otherwise I don't see much benefit from it; the biggest
> issue we have is scoping things by directory/vhost/location/file, this just
> seems like syntactic sugar.
> 
> On a related note, security methods are something I'd like to see; I.e
> something where you say
> 
>   DefineSecurityMethod ChosenFew {
> 	 AuthType Basic
>         AuthGroupFile /path/to/file
> 	 AuthName "off-limits except to the chosen few"
>   }
> 
> And then somewhere in a per-dir or per-vhost you put
> 
>   SecurityMethod ChosenFew
> 
> and the above applies.  Of course, I suppose that could be done with m4
> macros and the like.  
> 
> 	Brian
> 
> 
> --=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
> "Why not?" - TL           brian@organic.com - hyperreal.org - apache.org
> 


Mime
View raw message