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.
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
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_rewriteoffers detailed logging of its actions at the
trace8log levels. The log level can be set specifically for
LogLeveldirective: Up to level
debug, no actions are logged, while
trace8means that practically all actions are logged.