apache RewriteLog 触发内部服务器错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/673711/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-13 17:24:25  来源:igfitidea点击:

RewriteLog triggers Internal Server Error

apache.htaccess

提问by Gabriel Solomon

I am trying to do some debuging on my rewrite rules and wanted to enable RewriteLog to view how they are interpreted.

我正在尝试对我的重写规则进行一些调试,并希望启用 RewriteLog 来查看它们的解释方式。

but when i activate it i get Internal Server Error heres the line:

但是当我激活它时,我收到内部服务器错误,这是一行:

RewriteLog "/home/solomongaby/www/project/logs/rewrite.log"

thanks

谢谢

回答by Gumbo

The RewriteLogdirectiveis only allowed in the server or virtual host configuration (see Contextvalue).

RewriteLog指令仅允许在服务器或虚拟主机配置中使用(请参阅上下文)。

回答by Alekc

You should post whole string from apache log file to be sure, but i suspect that you've tried to add this string in .htaccess and it gives you error "you can't have rewrite log directive here".

您应该从 apache 日志文件中发布整个字符串以确保,但我怀疑您已经尝试在 .htaccess 中添加此字符串,并且它会给您错误“您不能在此处重写日志指令”。

P.s. it's

ps是

RewriteLog "/home/solomongaby/www/project/logs/rewrite.log"

and not

并不是

RewriteLog "/home/solomongaby/www/project/logs/rewrite.log

Right?

对?

回答by Sean Bright

It's most likely a permissions issue. Check Apache's error.log file.

这很可能是权限问题。检查 Apache 的 error.log 文件。