Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Recently, I decided to set up a local development environment for my work projects. I'm a PHP developer, with just enough knowledge of Linux and Apache to break things mightily.

To get the local environment looking like my work environment, I had to upgrade PHP. When I did, Apache wouldn't restart. I decided I wanted to start fresh (this is where things went wrong) and that I'd reinstall Apache and PHP using MacPorts.

So, I went through and tried to delete all the Apache files. Yup.

I ran locate apache2 and deleted any folders that looked important. (I know, I know)

Then I did a /usr/libexec/locate.updatedb to make sure everything was up to date.

I even restarted my machine, just to make sure.

The issue is, http://localhost still works. As does an alias I set up, http://butler.

Shouldn't they not work? Now that I'm this far in, are there any tips for how to completely remove Apache so I can start over?

Worst case, I have a timemachine backup, so I can always just restore that... Thanks in advance.

Update: It officially isn't working anymore. I'm afraid I might have some files still lingering, but for the meantime, it seems that Apache is gone. Now to reinstall. Thanks for the help!

share|improve this question
1  
if you run ps waux | grep httpd do you see anything? –  gravyface Apr 28 '10 at 19:30
    
myname 1332 0.0 0.0 599824 500 s000 R+ 1:36PM 0:00.00 grep httpd –  PJ. Apr 28 '10 at 19:37
    
kill -9 1332 will stop it for you then. –  Lee B Apr 28 '10 at 20:13
    
@Lee B, why would he want to kill 1332, which is the grep conmmand he just ran and will be terminated before he could even type in the kill command? –  John Gardeniers Apr 28 '10 at 22:03
    
@John: ah, missed the grep part. I guess I'm not so aware of checking for that these days, as I use pgrep which doesn't list itself in results. Thanks for catching that :) –  Lee B Apr 29 '10 at 18:33

1 Answer 1

up vote 2 down vote accepted

You say "(I know, I know)", but behave as if you don't know, so I'll explain :)

Just randomly deleting folders called apache2 is not likely to be effective. For one thing, apache isn't actually called apache; it's proper name is "httpd", by the Apache Foundation, so the most important files are probably called httpd on your system.

But the lesson to learn here is NOT that you deleted the wrong filenames. It's that you tried to delete things manually when operating systems provide uninstallers (or better, package management tools) for this sort of thing.

You also seem to be unaware of apachectl, which will help you stop the apache processes from a command line, and the system preferences, which let you do it from a GUI.

You might find this useful, for cleaning up:

http://wiki.apache.org/httpd/DistrosDefaultLayout#Mac_OS_X_.28Leopard.2C_Apache_2.2.29:

share|improve this answer
    
Thanks Lee. I actually also deleted the apachectl. Gotta give you guys a challenge, right! So, now that the installers, packages, management tools, etc., are all probably destroyed... –  PJ. Apr 28 '10 at 19:38

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.