httpd.conf -- clean logs

Building a Web Server, for Windows and Linux

LoadModule log_config_module modules/mod_log_config.so

<IfModule mod_log_config.c>
  SetEnvIf Request_URI "cmd\.exe" trash
  SetEnvIf Request_URI "root\.exe" trash
  SetEnvIf Request_URI "shell\.exe" trash
  SetEnvIf Request_URI "default\.ida" trash
  SetEnvIf Request_URI "wpad\.dat" trash

  LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined
  CustomLog logs/access_log combined env=!trash
  CustomLog logs/trash_log combined env=trash

  <IfModule mod_deflate.c>
    DeflateFilterNote Input instream
    DeflateFilterNote Output outstream
    DeflateFilterNote Ratio ratio
    LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
    CustomLog logs/deflate_log deflate env=!trash
  </IfModule>
</IfModule>