I recently upgraded OS X on my MacBook to the latest version —
During an OS X upgrade, Apple replaces an existing httpd.conf
file with a new version, presumably for security reasons. This is all well and good, but I use my MacBook for web-development and my customised httpd.conf
file is important to me. I’d prefer if Apple just left it alone.
Fortunately, Apple does make a backup of the existing file before it replaces it, so recovery is simply a case of replacing the new file with its predecessor:
cd /etc/apache2/
sudo mv httpd.conf httpd.conf.OLD
sudo mv httpd.conf~previous httpd.conf
sudo apachectl restart
Via: Stack Overflow.