[syslog-ng] Apache vhost logs

Matias Banchoff matiasb at cespi.unlp.edu.ar
Wed Jul 13 13:53:36 CEST 2011


Hi!
   are you using "combined" or "vhost_combined" in your V.H. config?  
For example:
         CustomLog "|/usr/bin/logger -s -p local5.info " vhost_combined
Bye!

On 07/13/2011 06:49 AM, Josu Lazkano wrote:
> Hello again, I configure on the client side some vhost log files this way:
>
> $ cat syslog-ng.conf
> options {
>          log_fifo_size(2048);
>          create_dirs(yes);
>          group(adm);
>          perm(0640);
>          dir_perm(0755);
>          use_dns(yes);
>          stats_freq(0);
>          bad_hostname("^gconfd$");
> };
>
> source s_all {
>          internal();
>          unix-stream("/dev/log");
>          file("/proc/kmsg");
>          file("/var/www/domain1/log/access.log");
>          file("/var/www/domain2/log/access.log");
>          file("/var/www/domain3/log/access.log");
>          file("/var/www/domain4/log/access.log");
> };
>
> destination logserver {
>          tcp("logserver");
> };
>
> log {
>          source(s_all);
>          destination(logserver);
> };
>
> With this configuration I don't get all access.log info, I put on the same screen a tail -f with a local access.log and user log on the logserver and on the vhost file there is more info. Is this configuration correct?
>
> Sorry for all those newby questions.
>
> Thanks for all your help and best regards.
>
>
> -----Mensaje original-----
> De: syslog-ng-bounces at lists.balabit.hu [mailto:syslog-ng-bounces at lists.balabit.hu] En nombre de Martin Schütte
> Enviado el: lunes, 11 de julio de 2011 21:06
> Para: Syslog-ng users' and developers' mailing list
> Asunto: Re: [syslog-ng] Apache vhost logs
>
> On 07/11/11 10:14, Josu Lazkano wrote:
>> I have lots of vhost on the client-side. How could I configure it?
> I find it preferable to have Apache log to syslog in the first place,
> e.g. with:
> CustomLog "||/usr/bin/logger -p local2.info -t apache" combined
> ErrorLog "||/usr/bin/logger -p local3.info -t apache"
>
> I use a custom log format to include a VHost field in access log lines
> (and later split them as needed). If you need seperate error logs as
> well, then it is probably best to include the VHost name in the
> tag/programname field.
>

-----
CeSPI 
Centro Superior para el Procesamiento de la Información

Universidad Nacional de La Plata
-------------------------------------------------------------------------------
Proteja el Medioambiente. No imprima este mail si no es absolutamente necesario


More information about the syslog-ng mailing list