Solved

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

Posted on 2007-11-18
3
7,081 Views
Last Modified: 2011-10-03
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]

</Directory>

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.

0
Comment
Question by:bsysd
  • 2
3 Comments
 
LVL 13

Accepted Solution

by:
John Mc Hale earned 500 total points
ID: 20309667
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.

regards.
0
 
LVL 13

Expert Comment

by:John Mc Hale
ID: 20309678
In particular, see the Context section at the following page http://httpd.apache.org/docs/trunk/mod/mod_rewrite.html#rewritelog
0
 

Author Comment

by:bsysd
ID: 20314768
Thanks fredthered. That got the server started and the logging turned on.    
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now