I'm on a fresh 10.9 install and the default Apache server is
org.apache.httpd: Already loaded after each startup. Is there a way to disable that autostart?
OS X provides
launchctl to control which daemons are started at boot time.
To stop and disable Apache:
- Open Terminal
Type the following command (type your login password when
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
A few words on
-w option is the silver bullet for stopping/disabling Apache. It tells
launchctl to do its job regardless of any configuration settings that would otherwise prevent it from unloading the service, as explained in
-w Overrides the Disabled key and sets it to false or true for the load and
unload subcommands respectively. In previous versions, this option would
modify the configuration file. Now the state of the Disabled key is stored
elsewhere on- disk in a location that may not be directly manipulated by any
process other than launchd.
(It turns out that, in OS X Mavericks (10.9), "elsewhere on-disk" is
-w option is indispensable if you started Apache with
apachectl start: as explained in this Superuser answer.
apachectl not only starts Apache but also modifies
/private/var/db/launchd.db/com.apple.launchd/overrides.plist like this:
In this particular case you can also use
sudo apachectl stop
to stop Apache and to set