While attempting to migrate my apache 2.2 webserver to apache 2.4 I an unable to transform this particular snippet.
RewriteEngine On
RewriteLogLevel 0
RewriteLog "logs/rewrite_80.log"
What would the apache 2.4 compatible code for this be.
While attempting to migrate my apache 2.2 webserver to apache 2.4 I an unable to transform this particular snippet.
RewriteEngine On
RewriteLogLevel 0
RewriteLog "logs/rewrite_80.log"
What would the apache 2.4 compatible code for this be.
I too am saddened by this discovery, but it looks like this capability (logging rewrites to a separate log file) was removed in Apache 2.4.
The suggestion in the documentation, referred to in the comments above, is to increase the log level specifically for mod_rewrite with something like this
# note that the example in the docs combines this with 'LogLevel alert'
# you can do them separately, too
LogLevel rewrite:trace3
…and then extract the specific log messages from the ErrorLog
file for the server/vhost using a Unix shell command like
tail -f error_log | fgrep '[rewrite:'
The Windows rendition of that would probably involve FINDSTR
or some equivalent PowerShell commands. (Not my area of expertise, apologies.)
Note that the module won't log anything at all up to a level of debug
, so the rewrite:traceN
really is necessary if you want to troubleshoot your rewrites:
mod_rewrite
offers detailed logging of its actions at thetrace1
totrace8
log levels. The log level can be set specifically formod_rewrite
using theLogLevel
directive: Up to leveldebug
, no actions are logged, whiletrace8
means that practically all actions are logged.