You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Terry Burton <te...@terryburton.co.uk> on 2006/04/10 23:38:33 UTC

Re: [users@httpd] Global and virtual host log configuration

Hi all.

This is cross-posted from the users mailing list. Please reply on the dev list.

It seems to be an irritating limitation of the configuration system
that one cannot configure httpd to simultaneously log to a global
access log as well as a virtualhost log since the virtualhost
customlog option overrides the global customlog option.

Perhaps an option that allows the virtualhost customlog options to
complement the global option rather than override it would be
possible? This would avoid the need to pipe to log splitting scripts
to achieve the desired effect.


Many thanks,

Tez


On 4/9/06, Joshua Slive <jo...@slive.ca> wrote:
> On 3/24/06, Terry Burton <te...@terryburton.co.uk> wrote:
> > Hi,
> >
> > I am running hundreds of virtual hosts on httpd server and each
> > virtual host successfully writes its own access log file to an
> > appropriate place.
> >
> > In addition to these virtual host logs, I would also like to generate
> > a global access log to a pipe (for logging to MySQL). Adding an
> > additional CustomLog directive to each virtual host launches a logger
> > program (attached to the pipe) for _each_virtual host_ which is
> > unacceptable.
> >
> > In a typical configuration httpd overrides the main CustomLog settings
> > with those found in virtual hosts. What I need is a way to specify the
> > main CustomLog such that it is not overridden, but rather
> > complemented, by further CustomLog directives in the virtual hosts.
> > This way I have a _single_pipe_logger_ capturing everything, as well
> > as the usual virtual host log files.
>
> Can't be done with mod_log_config without modifying the code.
>
> One solution would be to have two global CustomLogs: one piped to
> mysql and the other piped to a program that splits the logs for each
> vhost.
>
> Joshua.