Tags:

    *FIX* mod_rewrite: could not init rewrite log lock in child

    Ran into this issue a couple of times already, duplicating it here so I dont' have to go dig for it again:

    Error
    [crit] (2)No such file or directory: mod_rewrite: could not init rewrite log lock in child

    Fix
    <IfModule mod_rewrite.c>
         RewriteEngine On
         RewriteCond %{REQUEST_METHOD} ^TRACE
         RewriteRule .* - [F]
    </IfModule>
     

    To this:

    <IfModule mod_rewrite.c>
         RewriteEngine On
         RewriteCond %{REQUEST_METHOD} ^TRACE
         RewriteRule .* - [F]
         RewriteLog /var/log/apache2/rewrite.log
         RewriteLogLevel 0
    </IfModule>


    Original reference is here