Flexible configuration for Apache

How best to improve Apache’s configuration syntax is a hot topic just now, with a camp wanting to bring in Lua as a solution to all problems. In the absence of a clear vision of where they’re heading, I’ll remain sceptical but open to argument about that.

As a baseline, I strongly believe any major change should not force a new learning curve on our existing communities, including users, sysops, and module developers. Giving them new options is fine; forcing new things on them isn’t. At the same time, there are certainly things that could do with an overhaul: for example, virtual host configuration confuses the heck out of many users. What we could really do with is a hook to enable modules to take charge of the whole business of configuration, and take this argument (along with the current core config code) out of the server core.

Meanwhile, I’m working on incremental improvements that are fully back-compatible, requiring no changes to existing configurations or modules, but giving a useful new tool to server admins. This morning I committed a patch to implement an <If> block:

<If “expression”>
#arbitrary directives here
</If>

The expression is evaluated for each request, and the configuration contained applies if and only if the expression is true. This is intended primarily to offer a much simpler and easier (not to mention more rational) alternative to some of the ugly hacks people implement with mod_rewrite & friends.

It’s also the third application of the apache expression parser.

Posted on April 4, 2008, in apache. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: