MAMP not starting Apache server on El Capitan 10.1

2019-03-30 06:06发布

问题:

So I've been using MAMP just fine for an Apache server on Yosemite for some time now. I only need one local host, so I'm using regular MAMP and not MAMP Pro. I am on MAMP 3.4

When I click the "start servers" button, it doesn't respond to the click. It just shows the colored spinner like the application froze, and then nothing happens. Only the SQL server will start but not the Apache.(I don't even use SQL)

I can click through the preferences window just fine, and I can click the quit button, but the start servers button just gives that error.

The Apache box in the top right isn't filled in, and wont let me fill it in either. SQL box is filled it, if that matters. No error message at all. Totally lost.

回答1:

I ran into the same problem as well after upgrading Mavericks to El Capitan. Mysql did start, but Apache failed starting. I'm running MAMP 3.0.5 (regular version).

I managed to fix this issue by renaming a file in the folder /Applications/MAMP/Library/bin. Rename envvars to _envvars and restart Apache. This made Apache running again on my machine.



回答2:

Ok im new here but i figured it out.

sudo apachectl stop

Just ran that command.



回答3:

Try copying the pre update version of your httpd.conf file and restarting apache as recommended above.

sudo cp /private/etc/apache2/httpd.conf.pre-update /etc/apache2/httpd.conf
sudo apachectl restart

This worked for me. I had issues getting MAMP (Pro) to start Apache and when it was running it took a while to shutdown Apache, which is odd since it didn't start.

I blame El Capitan, always blame the captain if things go wrong. Except Captain Morgan, that's your own fault.



回答4:

Reinstalling MAMP was the easiest way for me as terminal still scares me. But make sure you follow the steps below so you don't lose all of your files and databases!

1. Rename your MAMP folder in Applications/ to "MAMPOLD" so that you don't overwrite your htdocs and databases.

2. Downloaded and install a fresh copy of MAMP from https://www.mamp.info/en/.

3. Replace the 'htdocs' and 'db' folders in your newly installed MAMP with the ones from your "MAMPOLD" folder.

Note that for the db folder I just transferred any folders and files that didn't exist in the new db folder so I didn't replace anything important. This may not be necessary but I didn't want to risk it.

4. Finally when you launch MAMP again you may have to change the ports to default if it isn't working. I had them orginally set to 80 and 3306 which is no longer working so now I have to put up with seeing localhost:8888 which is annoying but at least it's working! If anyone can help me with this I would be grateful.



回答5:

I found that the ServerRoot in http.conf used the path "/usr" Most Macs use "/users". Soon as I changed it and restart apache MAMP went live