Why won't Apache Server start in MAMP?

2019-02-11 15:39发布

I'm trying to view php files locally on my mac.

I'm running Yosemite.

I have MAMP installed on my computer. When I press start the MySQL server starts but Apache doesn't. An error message appears saying 'Error. Apache couldn't be started. Please check your MAMP installation'

I've gone through the internet typing stuff into terminal and changing 'envvars' to '_envvars' but nothing works.

I reinstalled OSX and that worked but when I shut down the computer the problem occurs again.

Can anyone help?

Thanks

11条回答
霸刀☆藐视天下
2楼-- · 2019-02-11 16:13

I think I've found the solution.

It was the wrong port. I altered the .conf file in the Apache folder. I changed all instances of port 8888 to 8000. When I run MAMP now it all seems to work fine.

Thanks for your help

查看更多
等我变得足够好
3楼-- · 2019-02-11 16:15

Also be aware that if you by any chance deleted the folder that was set as Document Root the last time you were using MAMP, you will get this error. Simply open MAMP again, change Document Root to a location that does exist and start the servers.

查看更多
放荡不羁爱自由
4楼-- · 2019-02-11 16:21

I received the same error but interestingly it was caused simply because I renamed the root folder and didn't realize it. Sounds like you have a different issue but for anyone else who gets this error message, make sure you haven't renamed the root!

查看更多
Ridiculous、
5楼-- · 2019-02-11 16:21

My Apache server problem arose after I enabled SSL on my server and tried a stack overflow suggested Terminal command (eek). So if this is your problem, check your https-ssl.conf file (Applications -> Mamp -> conf -> apache -> extra). The Document Root under the Virtual Host settings had a different file path for htdocs than where it was actually located (easily overlooked on the fly). I changed this to "/Applications/MAMP/htdocs" and presto, problem solved. Perhaps also check Document Root in your https.conf file (Applications -> Mamp -> conf -> apache) to see if it has the correct file path to htdocs too.

查看更多
放荡不羁爱自由
6楼-- · 2019-02-11 16:26

Check if you changed the Document Root Location or Renamed it. At least this was my mistake.

MAMP > Preferences > Web Server > Document Root

查看更多
登录 后发表回答