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

localhost not working just "http://127.0.0.1:8888/"

Hi Guys,

I need help, I just got a macbook with OS X mountain lion. and then after I installed MAMP Stack (got it from the app store) for some reason localhost isn't working when I type it in the address bar on the browser. the only way to access the root directory is "http://127.0.0.1:8888/ "

is there a way to enable "localhost"?

thanks in advance

6 Answers

you can use XAMPP, i find it better than MAMP.

In Xampp you can do the localhost, or even change the same to yourname/folder/

I would recommend not using MAMP and just setting up the stack manually. Here is a great guide. Here is another.

I would suggest having a read through the various configuration files for Apache you'll find in /etc/Apache2 & /etc/Apache2/extra as you can tailor its behaviour.

thanks for the feedback guys. I really appreciate it :)

James Barnett
James Barnett
39,199 Points

Michael - Any particular reason why you want to type the word localhost rather than it's IP address?

Randy Hoyt
STAFF
Randy Hoyt
Treehouse Guest Teacher

Can you access it like this?

http://localhost:8888/

It sounds like MAMP is just running on port 8888. I cover how to run it over port 80 in my PHP installation video:

Thanks Randy! I totally missed that one. anyway, everything's working now.thanks again.

James - I guess I just got used to typing "localhost". lol also for some reason the MAMP stack by bitnami doesn't allow me to use port 80, says a program is using that port. I'm not sure what's up with that.

Leigh Maher
Leigh Maher
21,830 Points

Hi Michael,

Can you share how you resolved this? I'm having the same issue and the Wordpress site I'm working on uses localhost in the path so it's breaks the site when I view it from 127.0.0.1

Thanks.