You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Terry Burton <te...@terryburton.co.uk> on 2006/03/24 11:40:59 UTC

[users@httpd] Global and virtual host log configuration

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.

Hope you can help.


Thanks,

Tez

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


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

Posted by Terry Burton <te...@terryburton.co.uk>.
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.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


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

Posted by Terry Burton <te...@terryburton.co.uk>.
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.

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

Posted by Joshua Slive <jo...@slive.ca>.
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.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Global and virtual host log configuration

Posted by Terry Burton <te...@terryburton.co.uk>.
Just bumping this because I've yet to find a satisfactory solution.

If no solution exists, is this worth forwarding to the devs?


Thanks!

Tez

---------- Forwarded message ----------
From: Terry Burton <te...@terryburton.co.uk>
Date: Mar 24, 2006 11:40 AM
Subject: Global and virtual host log configuration
To: users@httpd.apache.org


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.

Hope you can help.


Thanks,

Tez

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org