Learning Journal

Invalid command ‘RewriteLog’

A couple of days ago, I “upgraded” Fedora on my main PC and everything seemed to be working really well until I tried to set up a local development version of one of my sites back on the machine.

When I had put everything in its place and attempted to start httpd (Apache Web Server), I got this error message back:

Jul 08 13:09:53 beefong.lan httpd[13694]: AH00526: Syntax error on line 9 of /etc/httpd/conf.d/
Jul 08 13:09:53 beefong.lan httpd[13694]: Invalid command 'RewriteLog', perhaps misspelled or defined by a module not included in the server configuration
Jul 08 13:09:53 beefong.lan systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE

Screenshot of Apache Module Documentation Page

I have been using the Rewrite module since 2001, so I was very sure RewriteLog was neither an “Invalid command” nor misspelled! I wasted so much time trying to troubleshoot this error myself, and failing repeatedly. Then it hit me: Fedora 19 is shipped with Apache version 2.4! Could something have changed?

A quick search brought this information up:

From the official Apache 2.4 Documentation page: Apache Module mod_rewrite


Those familiar with earlier versions of mod_rewrite will no doubt be looking for the RewriteLog and RewriteLogLevel directives. This functionality has been completely replaced…

So where I used to have something like this in my virtual host configuration file:

RewriteLog logs/gidapp.rewrite_log
RewriteLogLevel	3
RewriteEngine On
LogLevel warn

now I just need to replace all that with something like this instead?

RewriteEngine On
LogLevel warn rewrite:trace3

4 replies on “Invalid command ‘RewriteLog’”

Its happened on july of 2008, now is 2014 and nobody know how to solve it, im getting crazy, why people change ok things, dont work here and haent log to see why

A similar thing happened to me when upgrading to a recent release of ubuntu (14.04) and discovering that my local web development environment would not run any more. Thanks for doing the research on this one, saved me looking into it too deep.

I cannot recall now. But going through the official documents just a few minutes ago, I am going to guess it is inside the Error Log file for the host. I noticed this line given as an example in the official page:

tail -f error_log|fgrep '[rewrite:'

Leave a Reply

Your email address will not be published. Required fields are marked *