我想启用重写日志来调试一些给我带来问题的重写规则。所以我在httpd.conf文件的末尾添加了这些行:
<IfModule mod_rewrite.c>
RewriteLog "/logs/rewrite.log"
RewriteLogLevel 4
</IfModule>
接下来我做的是重新启动 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
不过,我在error.log中没有任何线索。实际上,发生此错误时不会生成任何行。
我还尝试更改 RewriteLog 行以使用绝对路径:
RewriteLog "c:\xampp\apache\logs\rewrite.log"
请你帮助我好吗?