ran into an issue here that I am finding very little information on and I am hoping someone may be able to shed some light on it.

I was upgrading a server from apache 2.2 to apache 2.4. Within that server, there was a setup for redirecting to other locally hosted sites within the apache config. The problem with the setup is that it was using the directive RewriteLog and RewriteLogLevel to redirect output to a separate log other than the usual host logs. Reading up on the changes between the two versions of apache (2.2 vs. 2.4) it looks like RewriteLog and RewriteLogLevel have been deprecated and replaced with mod_rewrite. That is all well and good but I am not finding mention of a function within mod_rewrite that allows me to define a separate log file to write out the rewrite calls for that site within apache. Does anyone have any helpful hints or can point me in a good direction that may explain how to redirect output to a new log within mod_rewrite?


  • "RewriteLog and RewriteLogLevel have been deprecated and replaced with mod_rewrite" - just to clarify, these directives were part of mod_rewrite in Apache 2.2. They were removed in Apache 2.4. – MrWhite Feb 22 '17 at 22:27

You probably missed the correct parts to read. http://httpd.apache.org/docs/current/mod/mod_rewrite.html#logging

So, the functionality is now replaced by the standard per-module logger. Documentation at https://httpd.apache.org/docs/2.4/mod/core.html#loglevel

In a nutshell, everything goes to the ErrorLog and you'll need to filter the events by yourself using grep or other tools, but it won't really be hard since all of the lines are marked with the name of the module generating the line.

  • Thank you. It has been a long day and it just didn't click that parsing through the logs to another file is no longer handled by the web server. Thanks again! – John_Doe_77 Feb 22 '17 at 22:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.