snow leopard ate my apache config files

Being a Mac Geek, I purchased Snow Leopard and did the upgrade this past Sunday night. I did not get a chance to make sure everything worked after the upgrade, but I assumed it did.

Today, however, I tried to start up one of my ColdFusion instances and then went to a site. I got the big "Forbidden You don't have permission to access / on this server." error message in my browser. After doing some digging and working with Phil, our Mac god, we found that the httpd.conf file was modified. Around line 173 of that file, there is a block of code that was changed to this:

<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>

That last line is the key. I changed "Deny" to "Allow" (case sensitive without the quotes). Then I restarted Apache.

Once that was done, I got the "Not Found The requested URL / was not found on this server." error. We used named servers in Apache. Well, I looked in the httpd-vhosts.conf file, and it has wiped out my entire file! This is where I had all of my servers set up. I had to find an old copy and get one from a coworker (thanks Asha!) to get back up and running.

So, before you upgrade to Leopard, make sure to back up your httpd.conf file and any of the files in the apache2/extra directory!

I did find that in the apache2/users directory there was a file entitled myusername.conf which has what was the original of the code posted above. So the upgrade knew enough to save this off, just not the other stuff.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Jeff Coughlin's Gravatar Odd. The upgrade didn't touch my Apache cfg files (or at least any of my settings in the file). Granted, I keep very little in there though. All I have mostly are includes (example: I have a line that includes all cfg files in a subfolder called &quot;cfgs/clients&quot;). I then have each website call a separate cfg file for the CF engine (so it can use either CF7, CF8, CF9, Railo, or OpenBD depending on the project's needs).

Thanks for the tip (in case it happens to others). When I upgraded last week I did make sure to backup those files first just in case (because I've seen them wiped out before during an OS X upgrade when Apache was upgraded from 1.x to 2.x - luckily I was warned by someone like yourself before I did the OS upgrade).
# Posted By Jeff Coughlin | 9/2/09 11:03 AM
Garrett Johnson's Gravatar Very interesting... The upgrade did not modify mine either...
# Posted By Garrett Johnson | 9/2/09 11:38 AM
Hugo's Gravatar well the upgrade did touch my config files but my problem wasn't on that line actualy that line makes it more secure problem was on the http-vhosts.conf file in the extra directory you just have to comment the defaults there leaving the NameVirtualHost *:80 and your true vhosts and it's done :)
# Posted By Hugo | 9/2/09 4:37 PM
Nicholas's Gravatar For the record, Snow Leopard reverted my httpd-vhosts.conf back to the default as well. I had a back up, of course.
# Posted By Nicholas | 9/3/09 10:54 PM
Kevin Andrew Penny's Gravatar Aren't macs supposed to go back into time, through the space continuum - and fix all aliments? Time travel is possible apparently ;)
# Posted By Kevin Andrew Penny | 9/9/09 1:38 PM
Jeff Schuler's Gravatar Snow Leopard killed my vhosts file too... Boo.
# Posted By Jeff Schuler | 9/15/09 6:36 PM
J Rizzo's Gravatar My vhost files also were destroyed. And I had the hubris to upgrade without even checking the forums. Argh!
# Posted By J Rizzo | 9/21/09 3:17 PM
Roman Kamyk's Gravatar Snow ate my config too...
# Posted By Roman Kamyk | 9/23/09 8:03 AM
Hankk's Gravatar Thank you!! I was pulling my hair out over this and the overwritten httpd-vhosts.conf file was the culprit. Restored it and all was well. My httpd.conf file was not touched.
# Posted By Hankk | 9/23/09 2:26 PM
brindle's Gravatar I upgraded from Tiger and just got around to checking up on my Apache stuff. I had the virtual hosts in the httpd.conf file and they were extracted and placed in a &quot;username&quot;.conf. I'm pleased that they did that!

Thanks for this post, I was adding websites a lot differently in Tiger.
# Posted By brindle | 1/12/10 10:29 PM
BlogCFC was created by Raymond Camden. This blog is running version 5.7.002.