Local Web Development with macOS Sierra

My guide for setting up a great web development environment on your Mac, which was originally written with OS X 10.8 (Mountain Lion) in mind, updated for Mavericks, and then overhauled for Yosemite, has now been confirmed—by me—to work with macOS Sierra (10.12).

If you had previously used my tutorial, and upon upgrading to Sierra, your localhost has stopped working, it’s likely that you may need to restore your Apache config files.

When the Sierra updater runs, it replaces your edited Apache configuration file with the default one, wiping out any changes you have made. The good news is that there is a back up of your config files.

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 Sierra.

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.