[users@httpd] Re: how to prevent logging of proxy requests?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> >
> > Hi,
> >
> > I'm running apache 2.0.46 on RedHat Enterprise 3, with a normal web site
> > and also a proxy server on the same host.  I would like to separate the
> > logging of proxy requests from the requests for the web site itself.  If
> > there's a way to completely disable logging for proxy requests that would
> > be even better.
> >
> > I have played around a little bit with custom logging but it seems like
> > an inelegant way to address what I want to do ... unless of course I
> > haven't set it up in a smart way!
>
> Use SetEnvIf to separate the logging. See
> http://httpd.apache.org/docs-2.0/mod/mod_log_config.html#customlog at the
> end of the CustomLog directive.
>
> Joost
>

Thanks for the pointer.  This kind of construction seems to work pretty well:

# see whether the Proxy-Connection HTTP header is set; if so set
# apache environment variable
SetEnvIf Proxy-Connection ^[a-zA-Z].* proxy-request
CustomLog logs/access_log_proxy combined env=proxy-request
CustomLog logs/access_log combined env=!proxy-request

or if you want to discard log entries from proxy requests:
CustomLog /dev/null combined env=proxy-request

 -Peter

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux