Invalid command 'RewriteLog' - apache2.4版本日志配置方法变了

 以前这么配置:

...
RewriteLog logs/gidapp.rewrite_log
RewriteLogLevel 3
RewriteEngine On
...
LogLevel warn
...

改为:

...
RewriteEngine On
...
LogLevel warn rewrite:trace3
...

查看日志:

tail -f /usr/local/apache/logs/error_log
[Sat Mar 21 08:21:34.518820 2020] [rewrite:trace3] [pid 5618:tid 2482998080] mod_rewrite.c(483): ....

调试完还是关掉的好,避免增加服务器负载。

From the official Apache 2.4 Documentation page: Apache Module mod_rewrite

posted @ 2020-03-21 08:27  船长博客  阅读(571)  评论(0编辑  收藏  举报
永远相信美好的事情即将发生!