2014-11-24 120 views
0

我试图从mod_rewrite获取详细的日志消息为Apache 2.4。无法获得详细的Apache日志记录mod_rewrite

Apache手册告诉我把它添加到我的虚拟主机配置:

LogLevel alert rewrite:trace3 

的后https://stackoverflow.com/a/17279058/671639 sugests

LogLevel rewrite:trace3 

不幸的是阿帕奇给出了相同的错误消息对他们俩的:

Syntax error on line 45 of /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf: 
LogLevel requires level keyword: one of emerg/alert/crit/error/warn/notice/info/debug 

如果我用LogLevel debug,mod_rewri te没有记录任何东西。

任何想法?

回答

0

从您的错误消息中,您使用的Apache 2.2(或更早版本)没有trace1-trace8 LogLevels。您需要在2.4之前使用RewriteLog和RewriteLogLevel。

+0

我在OSX上使用MAMP。如果我去'/ Applications/MAMP/bin/apache2/bin'并且调用'httpd -v',我就得到'Apache/2.4.9'。 'phpinfo()'说'Apache/2.2.25'。 – BetaRide 2014-11-25 06:22:22