httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Ruprecht <rupr...@jilau1.Colorado.EDU>
Subject [users@httpd] Re: how to prevent logging of proxy requests?
Date Tue, 26 Apr 2005 15:59:36 GMT
> >
> > 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
> 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


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message