Logging for redirects between apache 2.2 and apache 2.4

apache-2.4mod-rewrite

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?

Thanks!

Best Answer

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.

Related Topic