Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress Local WordPress Development Local WordPress Development Customizing Your Local Server Setup on a Mac

Changed Ports in MAMP and Apache won't start (MAC)

I am using a newer version of MAMP to that in the video. When I go to change the ports in Preferences the option I have is "Set Web & MySQL ports to 80 & 3306". When I do this, the Apache server does not restart.

Any suggestions?

3 Answers

Gina Russo
Gina Russo
8,742 Points

This was exactly my problem. I updated to Yosemite and did this: Go to bin -> apache2 -> bin in the MAMP folder in Applications. Then renamed the file from envvars to _envvars.

Thanks!

No I haven't upgraded yet - still on OS X v 10.9.5.

The links you posted say to rename the envvars file envvars. I've just checked and my file is actually called envvars. I tried renaming it _envvars on the off chance but no joy.

Just to give you the full picture, clicking "Set Web & MySQL ports to 80 & 3306" sets Apache Port: 80, Nginx Port: 80 and MySQL Port: 3306. Is it ok for Apache and Nginx to use the same port?

Colin Marshall
Colin Marshall
32,861 Points

That is probably your issue. You are running two different web servers on the same port. Is there a reason you need to be running both? I would only run one or the other.

That's the default MAMP setup to include Apache, Nginx and MySQL (on this version anyway). I didn't choose to add Nginx in. When I hit Start Servers, there isn't a checkbox for Nginx, just Apache and MySQL so I'm not really sure where it fits in.

Default MAMP ports are Apache: 8888 Nginx: 7888 MySQL: 8889 and they work fine. It's only when I try to change them as per the video tutorial that I run into problems.

Just ran into this problem today. If you still see this issue just download the latest version of mamp.