Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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:

<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>
share|improve this question
    
Not having any rewrites, forgetting RewriteEngine on and not making any requests that hit rewrites could all cause it. Where are your rewrites defined? –  Ladadadada Apr 4 '12 at 8:22
    
@Ladadadada - I have RewriteEngine On and the actual rewrites inside a Virtual Host, inside a Directory (in httpd-vhosts.conf). I have made requests that hit rewrite. –  ripper234 Apr 4 '12 at 8:53
    
"Inside a <Directory >" sound suspicious. Could you add that part of your config to the question? –  Ladadadada Apr 4 '12 at 9:08
    
@Ladadadada - Added. –  ripper234 Apr 4 '12 at 9:18
    
I'm starting to run out of ideas. Might be time to see what Apache has to say about it. What's in your error log? –  Ladadadada Apr 4 '12 at 9:30

3 Answers 3

How about adding your error log in your vhost like i do for each vhost, ie something like:

<VirtualHost *>

    ServerAdmin webmaster@xxx.fr
    DocumentRoot "/web/htdocs/olivier/xxx/prod/website"

    ServerName xxx.fr
    ServerAlias *.xxx.fr
    ErrorLog "/web/logs/xxx.error.log"
    ...
    ...
    ...

</VirtualHost>
share|improve this answer
    
Nothing interesting there: pastebin.com/iUrT73hm –  ripper234 Apr 5 '12 at 8:16

I think this is a WAMP bug, based on this thread.

share|improve this answer
1  
Welcome to Server Fault! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. –  Scott Pack Sep 24 '12 at 2:17

I'm far from an apache guru, but I did notice you had:

AllowOverride None

under

My understanding is that this needs to be:

AllowOverride All
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.