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 Build a Simple PHP Application Getting Started with PHP Install PHP on Windows 7

Carlos Belnap
Carlos Belnap
4,564 Points

Why does Chrome tell me "webpage not available" when loading localhost?

Using the new Windows version of MAMP, set Apache port to 80, set Apache to be allowed on private networks. When I click "open start page" or type "localhost" or "localhost/test.php" into the address bar, I get a "webpage not available" message. But my code challenges still work. How can I fix this so I can test my PHP as I'm following along?

2 Answers

Logan R
Logan R
22,989 Points

Either the web server isn't actually working, could be something else is using port 80 like Skype, or Chome is just being mean. Try http://localhost and see if that takes you to where you want it to go.

Carlos Belnap
Carlos Belnap
4,564 Points

[http://localhost] gets same result. Trying to figure out how to see which ports are in use. How do I view my ports?

I also tried going into LAN settings, checking "use a proxy server," set address to localhost, port to 80, and check bypass proxy server for local addresses. But that didn't work either.

I should mention that I'm using my apartment's free wifi. It's private (password), but there are many users besides me. Will this affect my running a server?

Kevin Korte
Kevin Korte
28,148 Points

As far as running the Apache server to use PHP in development, that doesn't actually need an internet connection. You can use MAMP and the PHP will work locally without any internet access at all.

Kevin Korte
Kevin Korte
28,148 Points

Does it show that Apache is working correctly on your MAMP console?

Carlos Belnap
Carlos Belnap
4,564 Points

I think so. The "Apache server" checkbox goes from white to black and the "start server button" turns from grey to green and says "stop server."