Solved

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

Posted on 2007-11-18
3
7,103 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

773 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