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: AH00526: Syntax error on line 9 of /etc/httpd/conf.d/gidapp.com.conf: Jul 08 13:09:53 beefong.lan httpd: Invalid command 'RewriteLog', perhaps misspelled or defined by a module not included in the server configuration Jul 08 13:09:53 beefong.lan systemd: httpd.service: main process exited, code=exited, status=1/FAILURE
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 ...