Fixing Apache after upgrading to El Capitan


I’m not sure how many people are running Apache on non-server Mac OS X, but if you are and upgrade from Yosemite to El Capitan, you’ll get some breakage. The breakage won’t be as bad as upgrading from 10.10.4 to 10.10.5 was.

Apache generally will still work (as in the server will server up files that can be visited in a web browser). You’ll just have to edit the httpd.conf file to get some other things working.

Paste this command into the terminal to edit the httpd.conf file:

sudo nano -B /etc/apache2/httpd.conf
and go ahead and uncomment (remove the # sign from the beginning of the line) from LoadModule php5_module libexec/apache2/libphp5.so to get PHP working again (handy if you’re using something like MunkiReport).

While you’re in there, if you’re using SSL, you may also want to uncomment these three lines (you may have to search for them using Control-W):

  • Include /private/etc/apache2/extra/httpd-ssl.conf
  • LoadModule ssl_module libexec/apache2/mod_ssl.so
  • LoadModule socache_shmcb_module libexec/apache2/mod_socache_shmcb.so

Once you’re done, run a

sudo apachectl -t
to make sure your syntax is okay, and you didn’t accidentally type anything else while uncommenting. If that’s good, go ahead and restart the Apache service:
sudo apachectl restart


Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.