Logging for redirects between apache 2.2 and apache 2.4

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!

2
задан 22 February 2017 в 23:48
1 ответ

Вы, вероятно, пропустили нужные части для чтения. http://httpd.apache.org/docs/current/mod/mod_rewrite.html#logging

Итак, функциональность теперь заменена стандартным модульным регистратором. Документация на https://httpd.apache.org/docs/2.4/mod/core.html#loglevel

Короче говоря, все идет в ErrorLog, и вам нужно будет отфильтровать события самостоятельно, используя grep или другие инструменты, но это не составит особого труда, поскольку все строки помечены именем модуля, генерирующего строку.

2
ответ дан 3 December 2019 в 11:30

Теги

Похожие вопросы