localhost not working on xampp
Posted on 13th March 2009 by James Young | There are 17 comments so far
A remarkably boring and specific post but I suspect like me, a lot of people use XAMPP for local development and have suddenly found that a Vista update on or around the 11th March has meant you can’t browse to localhost on your machine despite no changes being made.
To fix this, you can do the following:
Go to C:\Windows\system32\drivers\etc\ and drag the hosts file into your open text editor and find this line:
::1 localhost
comment out the line so it looks like this:
# ::1 localhost
Save the file, clear your browser’s cache again and then try once again to go to http://localhost
Be sure to drag your host file to the desktop so you can save it and then drag it back to your etc folder.
The original solution/discussion is here: this thread on the XAMPP forums
Hope this helps those who find localhost isn’t working with XAMPP at the moment.
17 people have commented on this entry
Make a comment
You must be logged in to post a comment.
Arun Pattnaik
31st March 2009
Thanks a lot James. I was trying to find a solution to this problem for last few weeks. I hope it works for me :-)
Perry Molin
31st March 2009
Thank You. Much Appreciated.
Arun Pattnaik
31st March 2009
it worked. thanks a lot!
Danny
19th April 2009
Thanks alot, got it working now. Kudos to you. :)
muse
22nd April 2009
hi there i got the same problem but i am using WINDOW XP operating system. any one can help?
James Young
22nd April 2009
Hi Muse,
I’m not sure as I don’t run XP any more but have you tried the solution that works for Vista as outlined above?
I don’t know if the files in question are the same but you could take a copy of your original file and if it doesn’t fix it, just put the copy back and keep searching for a fix.
muse
22nd April 2009
Thanx James Young
i have tryed comment it as what it says for vista but it didn’t work any way tnx a lot mate.
James Young
22nd April 2009
Sorry, can’t help in that case. I had a look around for an XP fix for this problem but couldn’t find anything specific, just the fix for Vista.
It may be worth looking through your windows update logs for something installed by windows update around the time you noticed it stop working and uninstall that fix and see if that works?
Tanuj
29th April 2009
DUDE this is soo helpfull!! thanx!!
such a small fix for such a HUGELY ANNOYING problem
thanx again!
Ram
10th May 2009
Yes. I have a the same problem. I tried, I can not get the result. Any one can help us?
Joe
14th May 2009
James, thank you so much for the info. I have spent half a day looking for a fix.
Thanks!!!!!!!!!!!!!!!!
husen
26th May 2009
thank’s a lot…..I will try first.
PB
28th May 2009
it worked. thanks a lot!
LW
28th May 2009
Thanks alot, got it working now. Kudos to you. :)
hiliano
12th June 2009
Lets put it this way, I you call you Mr. Live saver lol
theZLister
1st July 2009
Thank you so much for this post! This has been a problem for a long time. Thank you!
abdou
21st August 2009
I have been having problems with my localhost but now its over because your advice has really helped me.
thank you very much!