Why do I get "RewriteLog not allowed here" when I try to start Apache

I am trying to use mod_rewrite in Apache. When I try to turn on rewrite logging I get the "Rewritelog not allowed here" message.

I am running multiple virtual hosts and this is the vhosts file for host in question:
AddHandler fcgid-script .php .php5
SuexecUserGroup proman psacln
<Directory /var/<...>/httpdocs>
     FCGIWrapper /var/<...>/bin/php5 .php
     FCGIWrapper /var/<...>/bin/php5 .php5
     Options +ExecCGI
     allow from all

     RewriteEngine On    

     RewriteLog "/var/log/httpd/promanage_rewrite.log" # this is the line referenced in the error message.
     RewriteLogLevel 9

     RewriteRule ^/js/analytics\.js$ lytics.php [QSA,L]


I have tried to put the log file in various places and nothing changes.
I have duplicated the permissions of other log files in the system to no avail.

If more info is needed, let me know.

Who is Participating?
John Mc HaleConnect With a Mentor Forensic Computer Examiner, Analyst/Programmer & Database ArchitectCommented:
RewriteLog and RewriteLogLevel are Server/Virtual Host config directive that cannot be used inside <Directory> or <Location> structures. Move them outside this block and restart the server.

John Mc HaleForensic Computer Examiner, Analyst/Programmer & Database ArchitectCommented:
In particular, see the Context section at the following page http://httpd.apache.org/docs/trunk/mod/mod_rewrite.html#rewritelog
bsysdAuthor Commented:
Thanks fredthered. That got the server started and the logging turned on.    
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.