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

PHP

Port 80 not working On MAMP

Hi, I'm trying to set up MAMP on my Mac. I was trying to change the port to 80, but it doesn't work. It won't let me launch the web page.

I've been trying to figure it out, but nothing works. It only works on port 8888. What's that mean? What's the difference.

Thanks

3 Answers

Do you know how to turn off apache?

Figured it out. Go to Mac Terminal type "sudo apachectl stop." Then enter admin password.

That worked for me. I don't know why it was on but it was.

Ross Litzenberger
Ross Litzenberger
11,706 Points

Reason that it set to port 8888. On the Mac, port 80 can be also use for a built-in web server (Apache) if that's enabled. So that is why MAMP is listening on 8888. You might be not able to listen on it. The only difference is that you wont be about to put localhost:(file name) you will need to put localhost:8888/filename.php

Ross Litzenberger
Ross Litzenberger
11,706 Points

Oh Sweet that is good to know. Mac can be a little trick some time. With this command you can see what is going on with your port ( sudo lsof -i -n -P | grep TCP ) after you enter in admin pw.