Turn Off the built in apache on OSx

There are a handful of reasons why you would want to turn off the built in apache on OSx, you might have installed your own version, maybe you don't use apache and it is interfering with something else, whatever the reason there is one command you need to run to turn it off.

sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist

You should run that from Terminal.app

I wanted to take a second to explain what is going on because too often people (myself included) will post a code snippet without explaining what it is, the worrying this is so many people run them without checking what is happening.

sudo tells your computer to run the following command as the root (administrator) account.
launchctl is an OSx program that interfaces with launchd, which is a daemon manager. Daemons are small programs that run as background processes (like what would setup Apache).
unload tells launchctl to unload a specified configuration file.
-w tells launchctl to override a disabled key, basically this will force the file to be marked as disabled.
/System/Library/LaunchDaemons/org.apache.httpd.plist is the file that we are unloading.

Hopefully that helps!

Recent posts View all

Conferences

Tips for how to ask for time off to attend conferences

Asking for time off to attend a conference can be nerve-racking, these tips will get you closer to attending the conferences you're interested in.

Ruby

Using the 'it' Gem to add links to translations

How to can use the 'it' Gem to add links to your translations