对于 Apache 2.2,我们使用以下内容 -
RewriteLog "/etc/httpd/logs/rewrite.log"
RewriteLogLevel 1
和
RewriteLog "logs/rewrite_test1.log"
RewriteLogLevel 1
如何在 Apache 2.4 中替换它们。
最佳答案
根据 Apache HTTP documentation ,看起来重写日志现在包含在错误日志中,您需要从中提取数据:
Those familiar with earlier versions of mod_rewrite will no doubt be looking for the RewriteLog and RewriteLogLevel directives. This functionality has been completely replaced by the new per-module logging configuration mentioned above. To get just the mod_rewrite-specific log messages, pipe the log file through grep: tail -f error_log|fgrep '[rewrite:'d.
错误日志的路径可以这样定义( more info there ):
错误日志“/var/log/httpd/error_log”
要控制重写日志级别,您可以使用 LogLevel Directive像这样:
Example: LogLevel alert rewrite:trace3
关于apache - 我们可以在 apache 2.4 中创建自定义日志文件吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45377606/