Summary: | write to error log upon RewriteRule [F]orbidden | ||
---|---|---|---|
Product: | Apache httpd-2 | Reporter: | Viktor Szépe <viktor> |
Component: | mod_rewrite | Assignee: | Apache HTTPD Bugs Mailing List <bugs> |
Status: | REOPENED --- | ||
Severity: | enhancement | ||
Priority: | P2 | ||
Version: | 2.2.22 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | Linux |
Description
Viktor Szépe
2014-01-11 19:21:53 UTC
Bugzilla is for reporting bugs, not support or Q&A. If you're suggesting an enhancement for 2.2, please reopen and reclassify. Sorry! I know it. I've just notived recently that fail2ban does not ban RewriteRule [F] requests. And yes, this is a feature request. I'd like to have "client denied by server configuration:" - like in mod_authz_host - written to the error log. I think that this is a one-liner in the source code. Could you please add this error message. Thank you! Using Apache 2.4 you can add custom logging using mod_log_debug. E.g. set your own env var in the RewriteRule as a side effect and then use mod_log_debug to log your chosen message when the env var is set. This feature doesn't exist for 2.2 though. I'm not judging on whether a builtin log statement makes sense w.r.t. consistency with AAA modules. Regards, Rainer Thank you for the mod_log_debug suggestion! I think enabling another module is the last resort. Is it function call needed to write in the error log? I think is should be in "case 'F':" in mod_rewrite.c. ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_SUCCESS, r, APLOGNO(01630) "client denied by server configuration: %s%s", r->filename ? "" : "uri ", r->filename ? r->filename : r->uri); |