This week I experienced a problem where my apache rewrite rules wouldn’t update or reload. I would change a 301 redirect or an alias, restart Apache and the changes wouldn’t process. Humph. I got to the point where I started to believe, like DNS, that these redirects where propagated somewhere out on the Internet and they were just happening. Of course, this doesn’t happen.
Our Apache setup contains conf files for several sites, and our main httpd.conf file has a section that includes these conf files:
# Load config files from the config directory "/etc/httpd/conf.d".
Include conf.d/*.conf
What I had done was left a backup config file in the /etc/httpd/conf.d directory, so I had mysite.conf and mysite-20090710.conf being included when Apache loaded. Weather Apache tried to load both config files or my backup was simply overwriting my real config, I’m not sure, but as soon as I removed the backup config everything started working as normal. From now on, my backup Apache config files will be named mysite.bak!
Share on Twitter Share on Facebook