Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I've had major issues with my default Apache install ever since I installed MAMP. I've uninstalled MAMP now but I'm still getting issues such as multiple Apache processes running, not stopping/starting/restarting, and the Web Sharing option not showing the correct state in System Preferences. I'm assuming MAMP has changed something within the default version of Apache, is there any way to easily replace the entire Apache install?

Thanks, Alex

share|improve this question

2 Answers 2

No easy way that I know of, but if the MAMP FAQ is correct, MAMP doesn't alter the default apache install in any way, so no guarantee it would help anyway.

If spurious apache processes is the problem, maybe look for any launchd jobs that MAMP has installed and not cleaned up (Lingon can help if you're not familiar with the command line)?

If all else fails of course, there's always the (annoying but effective) backup + clean OS X reinstall + migration assistant option, which might be a more effective use of a couple of hours of your life than fiddling about trying to fix it, if it's critical to get things working again...

EDIT: You might also double-check the complete list of files that MAMP claims to touch, just to make sure none of them have been left lying around on your machine, or have been altered in any way.

share|improve this answer
    
thanks alot for the very thorough answer. Had not checked MAMPs FAQ, it worries me a bit though if MAMP hasn't caused the issue as it was a fresh OS install in November. I've checked thru the list of MAMP files as well and if it's correct I can't see how it's causing the issue. Will do some more investigating this afternoon and update later –  Alex Feb 21 '12 at 14:08

Has another Apache been installed? From a terminal (Applications-> Utilities-> Terminal.app) try:

ps ax | grep httpd

You should see something like the following if your local web sharing is enabled:

25829 ?? Ss 0:00.04 /usr/sbin/httpd -D FOREGROUND -D WEBSHARING_ON 25831 ?? S 0:00.00 /usr/sbin/httpd -D FOREGROUND -D WEBSHARING_ON

Then try

ps ax | grep apache

This should return nothing if you are using the default install, but might if another server was installed.

If apache is running from anything other than /usr/sbin, then you may want to investigate your PATH environment variable in case it has been altered.

You could also try using the default httpd.conf file supplied by Apple (in case yours has been edited).

  1. Make a backup of the current one

    sudo cp /etc/apache2/httpd.conf /etc/apache2/httpd.conf.bak

  2. Copy the 'original' httpd.conf file

    sudo cp /etc/apache2/original/httpd.conf /etc/apache2/httpd.conf

  3. Restart the web server

    sudo apachectl restart

On a side note.. If you are or will be doing any long term web development, I would advise installing apache2, php, mysql, etc from MacPorts or Homebrew. There is a little bit of a learning curve, but it's easy when you get the hang of it and you will benefit over the long haul. Example port commands:

Search for applications to install

port search apache2

Install apache2

sudo port install apache2 (currently version 2.2.22)

Uninstall apache2

sudo port uninstall apache2

Upgrade..

sudo port upgrade apache2

Also, MacPorts installs everything into the /opt/ directory (I think Homebrew does as well), so you can always just delete the entire directory if you do not want them anymore. Again, if you do not mind digging in the trenches a bit and can be patient while your computer compiles these apps from source code (this can be lengthy), it will be worth your while.

share|improve this answer

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.