Home Conticreative Blogs Web Technologies Blog Has your XAMPP forgotten "localhost"? Here is the cure.

Blogs - Web Technologies Blog

Has your XAMPP forgotten "localhost"? Here is the cure.

Written by Marco Conti Thursday, 14 May 2009 00:00

Share |
User Rating: / 2
PoorBest 

My Windows Vista machine recently "forgot " that when I type "localhost" in my browser it would really be a good idea if I could get to my XAMPP homepage.

I have recently switched users in windows and when I went to use my local Apache server to test a database trick I am working on, Firefox was unable to connect to the XAMPP home page.

The error message read something like this: "This site seems valid but the browser was unable to establish a connection".

Naturally, the first thing I did was to Google the error message (Adding XAMPP  to the query) and the second result took me to a forum post in the XAMPP web site where some other poor fellow was complaining that he was unable to reach the "http://localhost" address, but when he tried  http://127.0.0.1 the XAMPP home page came up without issues.

Sure enough, I tried the same thing and XAMPP came up in all its glory (which is not much, but a welcome sight nonetheless).

He had a couple of responses, one leading him to another post on the same forum. That's where things got interesting.

Here is the post in its entirety:

Open C:\Windows\system32\drivers\etc\Hosts file in your notepad by right clicking on notepad and selecting run as administrator.
Check that you have this entry at the top of the list of uncommented entries.
127.0.0.1 localhost
If not then add the line as the first line in the list.

If you find this entry:
::1 localhost
then comment it out so it looks like this
# ::1 localhost

Save the file and try to access http://localhost again

After reading it, I did just that and after opening the host file I was able to pull up http://localhost just fine. A minor miracle considering how badly the rest of the day was going.

I hope this post will help someone  with the same problem. The forum post sure helped me and many thanks to the OP, but I know that for these kind of tips the more times it is repeated the better.

 

Trackback(0)

TrackBack URI for this entry

Comments (1)

Subscribe to this comment's feed

Show/hide comments
Thanks!
omg thank you thank you thank you!!!!

I have been all over google looking for a solution and I cannot believe it was this simple. I've been working on this for 6 hours now!!

You are my hero!
Carolyn , June 19, 2010

Write comment

smaller | bigger

busy

10 Minute Joomla! Tips Blog

Conticreative joomla book reviews

Independent joomla hosting reviews

Joomla Training

Conticreative offers Individual and Corporate training (in person or online) on Joomla, Wordpress, Zen Cart and other leading Open Source scripts.

[Read More...]

Books

Books we suggest...

 

Spreadfirefox Affiliate Button
switch the positions on