Mac – localhost went “It works!” – and nothing else

apache-2.2hosts-filelocalhostmac

I'm working with Mac's built in Apache, and everything was just great UNTIL – something went wrong. I think it's the .hosts file.

http://localhost results with "It works!" message, while any /[foldername] cannot be found. However, 127.0.0.1 works just fine, takes me to the /Sites on my username.

My .hosts file looks like that:

127.0.0.1 localhost
255.255.255.255 broadcasthost

I'm not that familiar with how Apache works; what did I do wrong? Where should I look?

Best Answer

The page "It Works" is the default apache Vhost. If you are getting this, it has nothing to do with the hosts file.

Will need more information on the url you are trying to access and what you expect to happen.

Related Topic