Skip to content

Instantly share code, notes, and snippets.

@Hidduh
Created May 17, 2019 11:01
Show Gist options
  • Save Hidduh/e20d4c7de91851bb1868437361f7f8ee to your computer and use it in GitHub Desktop.
Save Hidduh/e20d4c7de91851bb1868437361f7f8ee to your computer and use it in GitHub Desktop.
Restore Homebrew apache2 after updating macOS

Fix apache2 (via Homebrew) after updating macOS

  1. Disable & remove the default apache2 service macOS ships with using the following commands:
$ sudo apachectl stop
$ sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null
  1. Restore the old httpd.conf file with the following commands:
$ cd /etc/apache2/ 
$ sudo mv httpd.conf httpd.conf.OLD 
$ sudo mv httpd.conf~previous httpd.conf 
$ sudo apachectl restart
  1. Restart apache2 (brew)
$ sudo brew services restart httpd

Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment