如何在 Apache2 服务器上启用日志级别调试 [英] How to enable loglevel debug on Apache2 server

查看:64
本文介绍了如何在 Apache2 服务器上启用日志级别调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 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 配置文件上的日志级别:

I replaced loglevel on apache config file:

LogLevel 调试

重新启动后,我收到相同的错误消息,但没有所谓的回溯".据我了解,应该有 10 行由 mod_rewrite regex 生成的重定向.

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.

有什么想法吗?

推荐答案

请注意,此答案已有 3 年以上的历史.对于较新版本的 apache,请参阅 sp00n 的答案.将此答案留给旧版本 apache 的用户.

为了调试 mod_rewrite 问题,您需要使用 RewriteLogLevel 和 RewriteLog:

For debugging mod_rewrite issues, you'll want to use RewriteLogLevel and RewriteLog:

RewriteLogLevel 3
RewriteLog "/usr/local/var/apache/logs/rewrite.log"

这篇关于如何在 Apache2 服务器上启用日志级别调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆