我想启用重写日志来调试一些给我带来问题的重写规则.所以我在httpd.conf文件的末尾添加了这些行:
<IfModule mod_rewrite.c>
RewriteLog "/logs/rewrite.log"
RewriteLogLevel 4
</IfModule>
Run Code Online (Sandbox Code Playgroud)
我做的下一件事是重启Apache.但它会导致错误,并且无法启动.这是我在XAMPP控制面板中得到的:
13:14:56 [Apache] Error: Apache shutdown unexpectedly.
13:14:56 [Apache] This may be due to a blocked port, missing dependencies,
13:14:56 [Apache] improper privileges, a crash, or a shutdown by another method.
13:14:56 [Apache] Check the "/xampp/apache/logs/error.log" file
13:14:56 [Apache] and the Windows Event Viewer for more clues
Run Code Online (Sandbox Code Playgroud)
我在error.log中没有任何线索.实际上,当发生此错误时,不会生成任何行.
我还尝试更改RewriteLog行以使用绝对路径:
RewriteLog "c:\xampp\apache\logs\rewrite.log"
Run Code Online (Sandbox Code Playgroud)
请你帮助我好吗?