httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From UniCapitals <cashne...@gmail.com>
Subject [users@httpd] Apache 2.4 how to exclude certain GET requests from log using SetEnvIf
Date Thu, 15 Nov 2018 08:24:58 GMT
Hello to Apache Community,
I spent time with Apache docs and Google but did not find any real example for that.

I want to exclude from logging many unnecessary lines like that

83.266.84.27 - - [27/Oct/2018:14:07:19 -0500] "GET example.com/mod/maxtop.php HTTP/1.1" 200
3412 "http://example.com/page218.html" "Mozilla/5.0 (Windows NT 10.0; rv:56.0) Gecko/20100101
Firefox/56.0"

I tried
SetEnvIf Request_Method GET "^/maxtop\.php$" dontlog
and
SetEnvIf Request_Method "GET(.*)/maxtop\.php$" dontlog
...but no success.

Additional info
CentOS 7.5
Server version: Apache/2.4.6 (CentOS)
LogFormat "%h %l %u %t \"%m %V%U %H\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined

Thx for any hint what else to try (if Apache GET exclude by regex at all possible...)

Serge
Mime
View raw message