Mailinglist Archive: opensuse (1420 mails)

< Previous Next >
Re: [opensuse] FAILED: apache log full of wpad.dat
  • From: Per Jessen <per@xxxxxxxxxxxx>
  • Date: Sun, 19 Jan 2014 19:09:57 +0100
  • Message-id: <lbh4e1$2lt$2@saturn.local.net>
Patrick Shanahan wrote:

* Patrick Shanahan <paka@xxxxxxxxxxxx> [01-18-14 17:41]:
* Patrick Shanahan <paka@xxxxxxxxxxxx> [01-18-14 13:38]:
* Patrick Shanahan <paka@xxxxxxxxxxxx> [01-18-14 13:35]:
* Patrick Shanahan <paka@xxxxxxxxxxxx> [01-18-14 12:58]:
* Per Jessen <per@xxxxxxxxxxxx> [01-18-14 11:27]:
[...]
You really need two lines:

SetEnvIf Request_URI wpad\.dat dontlog=1
CustomLog file format env=!dontlog
^^^^^^^^^^^

Don't forget to amend 'file' and 'format' according to your
needs. Also note the different positioning of the '!'.

Then I need to replace the present line:
CustomLog /var/log/apache2/awstats.log combined
with:
SetEnvIf Request_URI wpad\.dat dontlog=1
CustomLog /var/log/apache2/awstats.log combined env!=dontlog

away atm, will report

apache2 start complaines about format and stops, removing "!"
from "env!=dontlog" satisfies the "format" error but doesn't stop
the wpad.dat
entries :^(

and I misplaced the "!", corrected and testing

Hooray, this does work, but somewhat oddly...

/var/log/apache2/awstats.log still displays wpad.dat entries while
access_log does not. So I have changed awstats.conf to use
access_log and condition is corrected to my satisfaction.

but I am having difficulty stopping apache2 from logging to only
access_log and not awstats.log ??


Spoke too soon, excluding "wpad.dat" log entries did/does not work!

but the conf file does not abort apache2.

ps: where are apache log files defined besides:
/etc/apache2/sysconfig.d/global.conf
/etc/apache2/conf.d/awstats.conf
/etc/sysconfig/apache2
/etc/awstats/awstats.web.conf

Put the setenvif statement in a global config, e.g. httpd.conf. Then add
the env=!dontlog to every customlog statement where you don't want
wpad.dat.

In the 'setenvif', maybe remove the backslash or add a 2nd one. Without
the backslash, the regex becomes a little 'wider', but that can be
fine-tuned later.


--
Per Jessen, Zürich (0.0°C)
http://www.hostsuisse.com/ - dedicated server rental in Switzerland.

--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups