Summary: | Apache 2.4 does not exclude Request_Method from log using SetEnvIf regex | ||
---|---|---|---|
Product: | Apache httpd-2 | Reporter: | Serge <altertag2013> |
Component: | mod_setenvif | Assignee: | Apache HTTPD Bugs Mailing List <bugs> |
Status: | RESOLVED INVALID | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 2.5-HEAD | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Linux |
Description
Serge
2018-11-21 15:15:36 UTC
> Request_Method "GET(.*)/maxtop\.php$"
This will never match, Request_Method is something like "GET" alone.
(In reply to Eric Covener from comment #1) > > Request_Method "GET(.*)/maxtop\.php$" > > This will never match, Request_Method is something like "GET" alone. Do you mean we can only exclude ALL GET requests but not certain GET requests by regex like SetEnvIf Request_Method "\.php$" dontlog ? Please, comment precisely to understand the issue finally, otherwise the question should be REOPENED. (In reply to Serge from comment #2) > (In reply to Eric Covener from comment #1) > > > Request_Method "GET(.*)/maxtop\.php$" > > > > This will never match, Request_Method is something like "GET" alone. > > Do you mean we can only exclude ALL GET requests but not certain GET > requests by regex like > SetEnvIf Request_Method "\.php$" dontlog > ? > Please, comment precisely to understand the issue finally, otherwise the > question should be REOPENED. You have to read the names of the parameters, Request_method has nothing to do with a URL. The manual is pretty clear: https://httpd.apache.org/docs/2.4/mod/mod_setenvif.html#setenvif Request_Method - the name of the method being used (GET, POST, et cetera) If you want to compare against the method and the URL at the same time, you'll have to use something more sophisticated like SetEnvIfExpr or <If> |