I've been using mamp for a while now and everything has been working great. Then today I go to start it up and mamp alert tells me that apache is already running on that port and to pick another one. So without starting mamp, I type in local host in the web browser - my usual way to get to the sites that I'm developing - and a page pops up and it reads IT WORKS!, which tells me that I have an index.php file somewhere on my computer that echos It works!. But mamp is not running and I can't find this stupid it works file anywhere. Is there any way to diagnose this and perhaps kill this apache server so that I can start mamp back up without switching my ports?

Edit: I don't see a way to delete this question. Anyways, I just realized my roommate enabled web sharing last night. That was the cause.

link|improve this question
feedback

closed as off topic by SvenW, Iain, Ward, Bart De Vos, Chopper3 Nov 21 '11 at 14:25

Questions on Server Fault are expected to generally relate to servers, networking, or desktop infrastructure, within the scope defined in the faq.

1 Answer

"It Works" is not a php file, it is the generic file that comes with apache. If you look in httpd.conf for the DocumentRoot you'll see the path to this file. It's usually something like, "/var/www/htdocs/index.html","/usr/local/apache/htdocs/index.html" etc.

Apache listen's on Port 80 default, again this is defined by httpd.conf. You can set apache to listen on whatever port you want.

You didn't tell us the OS you are using, but I assume you have another instance of apache already running. Find out where it is and stop it before running the mamp apache server.

usually there is an init script to stop/start apache - /etc/init.d/httpd stop or /etc/init.d/apache2 stop

or you can use "apachectl stop".

HTH

link|improve this answer
1  
I'll definitely have to remember that for the future. As I posted in my edit, my roommate turned on web sharing last night and that was the cause. – Scott Nov 20 '11 at 20:25
"MAMP: Mac, Apache, MySQL, PHP" and the "mac" tag on the question make the user's OS fairly unambiguous, actually. – jgoldschrafe Nov 20 '11 at 20:26
feedback

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