简体   繁体   中英

Change Ports in MAMP and Apache won't start (Mac)

I am using MAMP 3.2.1 on Mac OS X 10.9.5 and trying to change my Ports so I can go to localhost/... instead of localhost:8888/... in my browser.

When I go to change the ports in Preferences the option I have is "Set Web & MySQL ports to 80 & 3306", however when I do this, the Apache server does not restart.

I have seen other posts that say rename envvars to __envvars but mine is called envvars_ so I'm guessing that's irrelevant.

Any suggestions?

This is rather older post but I faced the same issue today. As it turned out there was already one more Apache running on port 80 and was clashing with the new MAMP port setup. Hopefully this will help you:

  1. Setup ports to 80 (Apache), 81 (nginx) and 3306 (mysql) in your MAMP configuration.
  2. Quit your MAMP
  3. From CLI type sudo apachectl stop
  4. From CLI type ps -A | grep httpd ps -A | grep httpd and you shouldn't see any running process (apart from your grep)
  5. Start your MAMP (at this point MAMP should start Apache since 80 port is not in use)

You can follow the instruction bellow, it worked for me.

1.Open Activity Monitor program and select "All Processes"
2.Search for "mysqld" in the search area. You might see an example of mysql running
3.hit quit process.
4.Restart MAMP and it will fix all.

When you have installed MAMP, before starting it, change the port to 80 & 3306, then it will work properly. Once you start it with default port and then stopping it and changing port raises this issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM