Apache 2.4 how to exclude certain GET requests from log using SetEnvIf

228 Views Asked by At

Spent some time with 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

SetEnvIf Request_Method "GET(.*)/maxtop\.php$" dontlog

...but no success.

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

0

There are 0 best solutions below