【发布时间】:2018-01-04 18:23:18
【问题描述】:
对于 Apache 2.2,我们在下面使用 -
RewriteLog "/etc/httpd/logs/rewrite.log"
RewriteLogLevel 1
和
RewriteLog "logs/rewrite_test1.log"
RewriteLogLevel 1
如何在 Apache 2.4 中替换它们。
【问题讨论】:
标签: apache mod-rewrite aem
对于 Apache 2.2,我们在下面使用 -
RewriteLog "/etc/httpd/logs/rewrite.log"
RewriteLogLevel 1
和
RewriteLog "logs/rewrite_test1.log"
RewriteLogLevel 1
如何在 Apache 2.4 中替换它们。
【问题讨论】:
标签: apache mod-rewrite aem
根据Apache HTTP documentation,看起来重写日志现在包含在错误日志中,您需要从中提取数据:
那些熟悉早期版本的 mod_rewrite 的人无疑会寻找 RewriteLog 和 RewriteLogLevel 指令。此功能已完全被上面提到的新的每模块日志记录配置所取代。 要仅获取特定于 mod_rewrite 的日志消息,请通过 grep 管道传输日志文件: tail -f error_log|fgrep '[rewrite:'d.
错误日志的路径可以这样定义(more info there):
错误日志“/var/log/httpd/error_log”
要控制重写日志级别,您可以像这样使用LogLevel Directive:
示例:LogLevel 警报重写:trace3
【讨论】: