git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug 62936] New: Apache 2.4 does not exclude Request_Method from log using SetEnvIf regex


https://bz.apache.org/bugzilla/show_bug.cgi?id=62936

            Bug ID: 62936
           Summary: Apache 2.4 does not exclude Request_Method from log
                    using SetEnvIf regex
           Product: Apache httpd-2
           Version: 2.5-HEAD
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_setenvif
          Assignee: bugs@xxxxxxxxxxxxxxxx
          Reporter: altertag2013@xxxxxxxxx
  Target Milestone: ---

Hello to Apache,

Environment
CentOS 7.5
Server version: Apache/2.4.6 (CentOS) installed from CentOS base repository
using yum
LogFormat "%h %l %u %t \"%m %V%U %H\" %>s %b \"%{Referer}i\"
\"%{User-agent}i\"" combined
CustomLog /var/log/httpd/access_log combined env=!dontlog

Problem description
EXAMPLE 1 - OK 
SetEnvIf Request_URI "\.png$|\.gif$|\.jpg$|\.jpeg$|\.js$|\.css|\.woff$" dontlog
everything is ok, it excludes from Apache log the lines like 
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/image.png"; "Mozilla/5.0 (Windows NT
10.0; rv:56.0) Gecko/20100101 Firefox/56.0"

EXAMPLE 2 - PROBLEM
SetEnvIf Request_Method "GET(.*)/maxtop\.php$" dontlog
does NOT exclude from Apache log the lines like
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 many other variations, for example
SetEnvIf Request_Method "\.php$" dontlog
but it does not work - anyway Apache does NOT exclude the according lines from
log file.

I asked StackOverflow
https://stackoverflow.com/questions/53025708/apache-2-4-how-to-exclude-certain-get-requests-from-log-using-setenvif
but nobody can't answer there.

I did not find in Google no one REAL example how to do that.
A week ago I asked same from users@xxxxxxxxxxxxxxxx - but also nobody answered
me.

Please, cross-check from your side - is this a bug of Apache 2.4 or
mod_setenvif ?
Why 
SetEnvIf Request_URI "\.png$|\.gif$|\.jpg$|\.jpeg$|\.js$|\.css|\.woff$" dontlog
- WORKS OK
but same
SetEnvIf Request_Method "\.php$" dontlog - DOES NOT WORK ?

Thanks in advance for attention and answer.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: bugs-help@xxxxxxxxxxxxxxxx