Wednesday, February 1, 2017

apache 2.2 - Empty rewrite.log on Windows, RewriteLogLevel is in httpd.conf

I am using mod_rewrite on Apache 2.2, Windows 7, and it is working ... except I don't see any logging information.



I added these lines to the end of my httpd.conf:




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


The log file is created when Apache starts (so it's not a permission problem), but it remains empty. I thought there might be a conflicting RewriteLogLevel statement somewhere, but I checked and there isn't.



What else could cause this?



Could this be caused by Apache not flushing the log file? (I closed it by hitting CTRL-C on the httpd.exe command ... this caused the access logs to be flushed to disk, but still nothing in rewrite.log)




My (partial) httpd-vhosts.conf:




ServerAdmin webmaster@localhost
ServerName my.domain.com
DocumentRoot c:\wamp\www\folder


Options -Indexes FollowSymLinks MultiViews
AllowOverride None

Order allow,deny
allow from all


RewriteEngine On
RewriteBase /

RewriteRule . everything-redirects-to-this.php [L]




No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...