2

When I view http://localhost/ in Google Chrome, it tries to download the homepage as a file, and doesn't display it. I tried http://localhost/ in Firefox 4 and it works fine.

In Chrome though, loading http://127.0.0.1 displays my website [which is PHP btw].

127.0.0.1 is localhost in my /etc/hosts file.

How can I make Chrome load my local website thru http://localhost?

Marco Ceppi
  • 48,101
Matt
  • 9,993

1 Answers1

4

This actually isn't anything wrong with the browser, per se. As I suspect, you created a php file - went to run it form the browser and it downloaded. So you went off, installed php5 and mod_php5 (and various other php packages) then tried again and it failed, again, but now http://127.0.0.1 works! This is simply a caching issue. Chrome remembers that the last time it accessed that php file it was downloaded - so it'll keep doing that until the browsers cache is dumped.

Clear Chrome's cache and you should be good to go!

Marco Ceppi
  • 48,101