Is it possible to write to error log - like mod_authz_host - upon HTTP/403 with RewriteRule? Thank you!
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);