httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rich Bowen <>
Subject Re: Some ramblings on httpd config
Date Wed, 10 Jun 2009 12:52:54 GMT

On Jun 9, 2009, at 08:49, Akins, Brian wrote:

> Some pseudo request processing code to do same thing:
> if listening_port == 80 then
>     if r.hostname == '' then
>         ....
>     elseif r.hostname =~ /www\[org|net]/
>     end
> end

As long as we're talking about exposing nifty syntax in the config ...

I'd be content (at least briefly - I'm sure I could find something  
else to be discontent about) if virtual hosts were less baffling, or,  
at least, harder to get wrong. Something like:

   <Websites foo[123]>
       DocumentRoot /x/y

   <Websites __dynamic__ >
       DocumentRoot /var/vhosts/HOSTNAME
       CustomLog /var/log/HOSTNAME.log combined

And perhaps something fancier regexey to encompass all of the magic  
that mod_vhost_alias does.

Or something like that that's sufficiently like what we have now to be  
easy to learn, but sufficiently different to be harder to get wrong,  
and a whole heck of a lot easier to do dynamic vhosts.

One of the other big complaints that comes up, in various ways, daily  
on IRC, is that there's no standard way to put variables in  
configuration directives. If we had a standard set of variables (like,  
say, HOSTNAME or whatever) that could be interpolated into config  
directives, as well as a standard way to do variable assignment and  
backreferences, that would solve a whole class of problems that are  
really pretty difficult right now.

Of course, I say all of that being utterly ignorant of how this all  
works internally, so feel free to ignore me. Like I said before, I  
answer the "how do I" questions every day, and frequently find myself  
wondering why things that *sound* so easy are actually so very  

A poet more than thirty years old is simply an overgrown child.
H. L. Mencken

View raw message