Apache Server Won't Start in MAMP

馋奶兔 提交于 2019-12-20 09:53:19

问题


Apache server won't start when in MAMP. Here are the error logs:

[Wed Aug 01 21:07:34 2012] [notice] Digest: generating secret for digest authentication ...
[Wed Aug 01 21:07:34 2012] [notice] Digest: done
[Wed Aug 01 21:07:34 2012] [notice] Apache/2.0.63 (Unix) PHP/5.3.2 DAV/2 configured -- resuming normal operations
[Wed Aug 01 21:08:00 2012] [notice] caught SIGTERM, shutting down
[Wed Aug 01 21:08:01 2012] [notice] Digest: generating secret for digest authentication ...
[Wed Aug 01 21:08:01 2012] [notice] Digest: done
[Wed Aug 01 21:08:01 2012] [notice] Apache/2.0.63 (Unix) PHP/5.3.2 DAV/2 configured -- resuming normal operations
[Wed Aug 01 21:08:51 2012] [notice] caught SIGTERM, shutting down

I don't think I did anything our of the ordinary except create a new folder in htdocs. Any suggestions?


回答1:


My solution: in /Applications/Mamp/Library/bin, find the file envvars and rename it to _envvars.

now it works.




回答2:


I encountered this same issue with the same log output above, but did not need to reinstall MAMP to solve the issue in my case. When I encountered this error it was related to one of the hosts I had set up. Click the Hosts tab and see if any of your hosts appear in red:

The host in red required SSL certificates. In the configuration I did not have valid references to the required certificates after I had altered the file structure of my application. After fixing this issue and applying changes the host was no longer highlighted in red, and I was able to start Apache through MAMP.

Additionally, you can ensure that the problem doesn't have to do with your Apache client itself by running this command in terminal:

sudo /Applications/MAMP/Library/bin/apachectl restart

OR

sudo /Applications/MAMP\ PRO/Library/bin/apachectl restart

If you are able to start Apache in terminal, you have ruled out that you have an error with MAMP's Apache client itself.




回答3:


Change the name of the file envvars to _envvars in /Applications/MAMP/Library/bin , thats it .




回答4:


Just reinstalled MAMP and changed the ports. Not sure what the problem was, but it's fixed now.




回答5:


Instead of reinstalling mamp I did the following:

1. Moved back to default mamp ports
2. Started mamp   
3. Stopped mamp 
4. Went back to ports 80 443 3306

and it started working.




回答6:


If your existing MAMP PRO suddenly won't start Apache anymore, then it might be an error in vhosts settings which is not visible.

There is often no indication in apache_error.log - it just comes up with the message.

Apache wasn't able to start. Please check log for more information.

In my case it was a wrong path in Customized virtual host settings such as

Include /path/to/project/rewrite.conf

Vhost config is saved in ~/Library/Application Support/appsolute/MAMP PRO/httpd.conf so you can check the settings there.




回答7:


Solution: MAMP 4 - Dec 2017, macOS High Sierra

Had this issue with MAMP Pro 3.4.1 so i paid for a new license so i could upgrade to Version 4.2.1 and the problem still occurred. I tried the above solution and unfortunately had no luck.

I did however get Apache running again by selection all options for the directory directive as shown in the image below:

This issue occurred completely randomly, one day everything working fine then the next... Apache says no. I believe the issue is that like web browsers use a Cache and separately also hold open processes, i think sometimes when MAMP or MAMP Pro is not closed properly then it can screw up Apache because it is not stopped correctly.

I hope this answer helps any persons experiencing this issue!




回答8:


In case above answers didn't fix it, you can check that Document Root isn't set on some non-existing directory. Go to MAMP Settings > Web-Server > Document Root




回答9:


I found a Solution:

JUST:

in /Applications/Mamp/Library/bin, find the file envvars and rename it to _envvars.




回答10:


this issue comes to me today … after trying several solutions, i found this dialog message may appear if MAMP no longer finds a certificate used by a securized localhost. So be careful to keep them in a place you won't move or delete.

hope it helps



来源:https://stackoverflow.com/questions/11771105/apache-server-wont-start-in-mamp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!