在Windows上为空rewrite.log,RewriteLogLevel位于httpd.conf中

我使用Apache 2.2,Windows 7上的mod_rewrite,它正在工作…除了我没有看到任何日志信息。

我将这些行添加到了我的httpd.conf的末尾:

RewriteLog "c:\wamp\logs\rewrite.log" RewriteLogLevel 9 

日志文件是在Apache启动时创build的(所以这不是一个权限问题),但它仍然是空的。 我以为可能有一个冲突的RewriteLogLevel语句在某处,但我检查,没有。

还有什么可能导致这个?

这可能是由Apache不刷新日志文件? (我通过在httpd.exe命令上点击CTRL-C来closures它…这导致访问日志被刷新到磁盘,但在rewrite.log中仍然没有任何内容)

我的(部分)httpd-vhosts.conf:

 <VirtualHost *:80> ServerAdmin webmaster@localhost ServerName my.domain.com DocumentRoot c:\wamp\www\folder <Directory c:\wamp\www\folder> Options -Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule . everything-redirects-to-this.php [L] </IfModule> </Directory> </VirtualHost> 

如何在你的虚拟主机中添加你的错误日志,就像我为每个虚拟主机一样,比如:

 <VirtualHost *> ServerAdmin [email protected] DocumentRoot "/web/htdocs/olivier/xxx/prod/website" ServerName xxx.fr ServerAlias *.xxx.fr ErrorLog "/web/logs/xxx.error.log" ... ... ... </VirtualHost> 

我认为这是一个基于这个线程的WAMP错误。

我远离apache大师,但我注意到你有:

 AllowOverride None 

我的理解是,这需要是:

 AllowOverride All