Skip to content

Instantly share code, notes, and snippets.

@synackme
Last active August 29, 2015 13:57
Show Gist options
  • Save synackme/9907575 to your computer and use it in GitHub Desktop.
Save synackme/9907575 to your computer and use it in GitHub Desktop.
How to stop Apache permanently on Mac OS X Mavericks

##Disable Integrated Apache Server in OSX

This will stop a running instance of Apache, and record that it should not be restarted. In otherwords, Apache stays disabled even after rebooting.

sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
command/flags description
sudo run as root (administrator) account
launchctl OS X program interfaced with launchd which is a daemon manager
unload tells launchctl to unload a configuration file
-w tells launchctl to override a disabled key forcing the file to be marked as disabled
/System/Library/LaunchDaemons/org.apache.httpd.plist file we are unloading

in the end, the config changes are stored in /private/var/db/launchd.db/com.apple.launchd/overrides.plist

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