Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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,135 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,135 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."