On my Mac OS X, Web Sharing is disabled in System Preferences -> Sharing -> Services -> "Personal Web Sharing". Still, when I type "localhost" in the browser, I get the "It works!" message, meaning that Apache is still running. How do I disable it?

Currently the bundled Apache port 80 is conflicting with my MAMP installation, since I want MAMP to run on 80.


Disabling Web Sharing in System Preferences should disable Apache.

However, make sure that when you load "localhost" in your browser, that you force a refresh rather than your browser loading the cached response from when Apache was running. You can force a refresh by Command-Shift-R in many browsers (as opposed to Command-R for a normal refresh).

Additionally, you can verify that Apache is no longer loaded by running this command in Terminal:

ps aux | grep httpd

If Apache is loaded, you will see a ps entry for

| improve this answer | |
  • You can also kill apache manually if it's just hanging on for some inexplicable reason, but I would suggest rebooting the machine first (If apache starts at reboot something still thinks it should be running - No idea what, but we could start looking for other ideas...) – voretaq7 Jun 1 '11 at 15:44
  • Disabling web sharing merely prevents access to the web server from other machines. It doesn't disable Apache. – John Gardeniers Jun 2 '11 at 21:49
  • Strange. On my 10.8.3 setup I no longer have "Web Sharing" in the list, but everytime I 'killall httpd', the /usr/sbin/httpd process reappears after a couple of seconds. – Nic Cottrell Apr 27 '13 at 14:38
  • @NicholasTolleyCottrell - You ever get that figured out? Where httpd keeps restarting itself. That's pretty annoying... – jmort253 Mar 18 '14 at 17:15

It seems that Apache on 10.8 had decided to become active (perhaps after a minor update). Found that you can run the following command to permanently disable Apple's Apache:

sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
| improve this answer | |

You could also simply try turning Web Sharing on and then back off. People forget that the interface does not always give you accurate information on the state of the system.

By turning Web Sharing on, you get the opportunity to turn it off and cause the system to do the steps associated with turning it off. Simply looking at the check box and seeing it is unchecked doesn't do that.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.