On 4/1/08 9:40 AM, "Torsten Foertsch" <[EMAIL PROTECTED]> wrote:
> I know one can do that. But a VHost has a server_rec, maybe a separate
> error_log and access_log, etc. Those cannot be created at request time. That
> is what I meant.
Well....
I was hacking around with the idea that the selection of vhost is a hook,
rather than how it is now. Basically, what I did was protect the vhost list
with a mutex, so you can add/delete (well not fully delete) vhosts. Combine
that with a "global" logger (ie, piped logger to syslog-ng) and the access
and error logs are "created" on the fly as well.
In the end, it was way too hacky and I haven't thought about it much in well
over a year.
In pseudo config, like niq is suggesting, you could have something like:
<If HTTP_HEADER{Host} =~ cnn\.com$ || TCPPort == 8080>
#cnn specific stuff here...
DocumentRoot /htdocs/cnn
CutomLog "|/usr/bin/logger cnn" my_format
ErrorLog /var/log/cnn.error
</If>
Hmmmm....
Would just have to move a bunch of stuff to per_dir and make sure all of our
directory config creation and merging is very fast...
This IF/else stuff could be done in a module and not in core for testing
purposes. Not quite where I'd like the config to be, but this may actually
be obtainable in near future.
--
Brian Akins
Chief Operations Engineer
Turner Digital Media Technologies