如何在Apache2服务器上启用日志级别调试 [英] How to enable loglevel debug on Apache2 server
问题描述
我的error.log包含:
My error.log contains:
由于可能的配置错误,请求超过了10个内部重定向的限制。如果需要,使用LimitInternalRecursion来增加限制。使用'LogLevel debug'来获取回溯。
Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
我在apache配置文件中替换了loglevel:
I replaced loglevel on apache config file:
LogLevel debug
重新启动后,我收到相同的错误消息,没有什么可以被称为追溯。据了解,应该有mod_rewrite正则表达式生成的10行重定向。
After restarting, I'm getting the same error message without what could be called "a backtrace". As I understand there should be those 10 lines of redirects generated by mod_rewrite regex.
在互联网上搜索完整后,我发现了很多关于loglevel和mod_rewrite的解释,但是不是一个如何使loglevel调试工作的一个字。
After searching all over the internet I've found plenty of explanations of loglevel and mod_rewrite, but not a word of how to make loglevel debug work.
任何想法?
推荐答案
对于旧版本的apache:
要调试mod_rewrite问题,您需要使用RewriteLogLevel和RewriteLog:
For older version apache:
For debugging mod_rewrite issues, you'll want to use RewriteLogLevel and RewriteLog:
RewriteLogLevel 3
RewriteLog "/usr/local/var/apache/logs/rewrite.log"
编辑:请注意,这个答案是3岁以上。对于较新版本的apache,请参阅sp00n的答案。为旧版本的apache的用户留下这个答案。
note that this answer is 3+ years old. For newer versions of apache, please see the answer by sp00n. Leaving this answer for users of older versions of apache.
这篇关于如何在Apache2服务器上启用日志级别调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!