https://issues.apache.org/bugzilla/show_bug.cgi?id=55192
Bug ID: 55192
Summary: htaccess error messages missing request context
Product: Apache httpd-2
Version: 2.5-HEAD
Hardware: All
OS: All
Status: NEW
Severity: trivial
Priority: P2
Component: Core
Assignee: [email protected]
Reporter: [email protected]
Created attachment 30531
--> https://issues.apache.org/bugzilla/attachment.cgi?id=30531&action=edit
Make request_rec information available to htaccess error logging
Error logging for .htaccess is missing request information.
This information is not available to ErrorLogFormat as the request_rec is not
passed in (for example, on vhost aliasing, %V cannot find the request host and
so makes determining where an error was generated impossible)
As part of the changes for PR 52439, the very common .htaccess errors AH02295
and AH02296 are now logged locally inside invoke_cmd and ap_walk_config_sub.
Since no associated request_rec is available, these are logged using
ap_log_perror().
One possible solution is to add the request_rec to cmd_parms and use
ap_log_rerror() when available. However, as this changes the API it may not be
desirable. I've attached a rough patch demonstrating this workaround.
Example:
ErrorLogFormat "%-V [%{c}t] [%-m:%l] %7F: %E: [client\ %a] %M% ,\ referer\
%{Referer}i""
Before:
- [2013-07-03 00:46:02] [core:warn] AH02295: Options in .htaccess forbidden by
AllowOverride
After:
somedomain.com [2013-07-03 14:47:56] [core:warn] [client X.X.X.X:Y] AH02295:
Options in .htaccess forbidden by AllowOverride, referer
http://somedomain.com/somefile.html
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]