httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis J." <denni...@conversis.de>
Subject Re: C as config
Date Sat, 05 Jun 2010 02:18:03 GMT
On 06/05/2010 12:51 AM, Igor Galić wrote:

>> Not a terribly interesting read, but we are seriously considering just
>> using
>> straight C with some helper functions and macros as the "config" for
>> one of
>> our projects.
>>
>> And, for the record I was wrong in the past - yes, async is the
>> answer...
>
> I've been a longtime critic, though I haven't taken it to the list,
> of the httpd Configuration Language. For other reasons than performance
> though -- mostly sane defaults, but that's an entirely different topic.
>
> BUT: I did my share of support on nginx - even though I don't know it
> well enough and nginx, like varnish, uses a C-like syntax for the configs.
>
> I for one, would welcome such a possibility.
>

The nginx syntax may look C-like but it really isn't at all. For one thing 
it's declarative and then you have all kinds of weird behaviors with 
variables and control structures that make no sense if you're coming from 
C-like angle.

I think what Brian is really aiming for is an actual procedural 
configuration that basically gets executed when a request arrives. 
Something along the line of:

function handleReq( req ) {
   if( req.domain ~ www.test.com ) {
      documentRoot("/sites/test");
      customLog("/var/log/test.log","combined");
      return true;
   }
}

Not sure if that would do much for Apache but with nginx sometimes I really 
would like to have something like this.

Regards,
   Dennis

Mime
View raw message