Local Web Development With OS X Mavericks

I recently wrote a guide for setting up a great web development environment on your Mac, which was written with OS X 10.8 (Mountain Lion) in mind. With the release of Mavericks, I expected there would be adjustments to be made for the instructions. I’m very pleased to report that my guide for 10.8 works flawlessly with Mavericks, so I have no need to make changes.

If you’ve followed my guide, or have created your own method to set up a multi-site environment for local web development, you will probably find, upon upgrading to Mavericks, that your localhost has stopped working. Do not fear. You may need only to take one step to rectify the issue.

When the Mavericks updater runs, it replaces your carefully edited Apache configuration file with the default one, which will wipe out any changes you have made. The good news is that someone at Apple was kind enough to back up your Apache configuration files for you.

Running the following commands will restore your pre-upgrade Apache configuration, and restart apache:

sudo cp /etc/apache2/httpd.conf.pre-update /etc/apache2/httpd.conf
sudo apachectl restart

This alone should restore your settings, and kick start your old environment under Mavericks.

If you have not yet upgraded, I would encourage you to first make your own backup of your config file, just in case your upgrade fails, and you need to start from scratch.