More Snow Leopard Pain – Apache and PHP

After updating to Snow Leopard, apache stopped working. The console was full of:
9/25/09 8:53:15 PM org.apache.httpd[38614] Warning: DocumentRoot [/usr/docs/dummy-host.example.com] does not exist
9/25/09 8:53:15 PM org.apache.httpd[38614] Warning: DocumentRoot [/usr/docs/dummy-host2.example.com] does not exist
9/25/09 8:53:15 PM org.apache.httpd[38614] Syntax error on line 99 of /private/etc/apache2/extra/httpd-ssl.conf:
9/25/09 8:53:15 PM org.apache.httpd[38614] SSLCertificateFile: file '/private/etc/apache2/server.crt' does not exist or is empty
9/25/09 8:53:15 PM com.apple.launchd[1] (org.apache.httpd[38614]) Exited with exit code: 1
9/25/09 8:53:15 PM com.apple.launchd[1] (org.apache.httpd) Throttling respawn: Will start in 10 seconds

Apparently, Apple decided to blow away my very custom apache2 config and replace it with a generic one. Not cool. As a developer of many web sites, I have a virtual host for every project of the form localhost.domain.tld. These were all gone.

Also, the php was broken. The fix included first downgrading php which required downloading and recompiling every single open source library I had (dozens) because of the new 64 bit object file format.

Then, finally I got the above error and using Time Machine recovered my old httpd.conf and extras folders from my pre-Snow Leopard backup and its all working again.

Leave a Reply

You must be logged in to post a comment.