Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have several instances of httpd running on my Mac. Don't need to run a web server, would like to end them all, as they add up to about 100mb of unnessecary RAM. What is the configuration that sets them to run? How can I disable it?

share|improve this question
add comment

3 Answers

up vote 9 down vote accepted

Mountain Lion removed the Web Sharing option, maybe you upgraded and had it running some time in the past? Anyway, you'll need to open Terminal for this:

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

The first will fail if you've already killed all the processes, the second disables startup.

share|improve this answer
    
He's on 10.7.4 according to the Q. –  Daniel Beck Oct 12 '12 at 20:06
    
Fair, but in the future as more users come back to this same question they may be on 10.8 (or later) so overtime this is a more relevant answer. –  Jeff Oct 12 '12 at 20:29
    
This solved it for me on 10.7.5; even though Web Sharing exists and is unchecked in System Preferences, httpd was surviving/respawning through killall until using this launchctl command (but this particular system might have other issues) –  rymo Jun 13 '13 at 18:50
add comment

Open the Sharing preference pane in System Preferences and uncheck Web Sharing.

share|improve this answer
    
FWIW, this option has been removed from Mountain Lion. –  Daniel Beck Oct 12 '12 at 18:41
    
nope still running httpd on my lion –  Nicolas Manzini Mar 3 at 21:50
add comment

sudo kill -9 [PID] and entering the process ID for PID ends any process. This can kill httpd . Now, you want to remove httpd form startup since you dont use it anyway. Go to:

Library/LaunchAgents

Library/LaunchDaemons

Library/StartupItems

and remove httpd from these locations. This will stop it from ever running again. You can keep a backup though just in case you want the Apache web server in the future.

share|improve this answer
    
So why the downvote? This method works... not something hard.You can just google this –  Gutsygibbon Oct 12 '12 at 19:05
    
httpd is normally started by /System/Library/LaunchDaemons/org.apache.httpd.plist, and changing the contents of /System is not recommended. Using launchctl to manage it (as @Jeff recommended) is a much better way to do it. –  Gordon Davisson Oct 13 '12 at 14:25
    
I see. Thanks for pointing that out. –  Gutsygibbon Oct 15 '12 at 13:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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