httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From UniCapitals <>
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 - - [27/Oct/2018:14:07:19 -0500] "GET HTTP/1.1" 200
3412 "" "Mozilla/5.0 (Windows NT 10.0; rv:56.0) Gecko/20100101

I tried
SetEnvIf Request_Method GET "^/maxtop\.php$" dontlog
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...)

View raw message