Hi. I have installed apache on my computer(windows vista) and works fine for almost one year on both http://localhost and http://127.0.0.1 Yesterday i run a very slowly script in php and from then http://localhost is not working but http://127.0.0.1 is working I think it's a dns problem. (i've already cleared dns cache) but still the same problem. What do I need to to to make localhost working again? Thank you
already checked packets sent 4 received 4 lost=0 (0%) it's strange for me too because until yesterday was working fine. Any other solution?
That is the type of problem I would spend four or five hours on and suddenly half of the day is gone. Here's what I would do: ((There could be better ways....)) If you have Vista set up to frequently save restore points, and have not recently installed any important programs, then choosing your most recent restore point might be exactly what you need to get your system back to the way it was before. Like I said: there probably is better ways to fix it.
Check your HOSTS file to see if you didn't screw it up (duplicate lines, wrong lines, etc). It should only have this in it: 127.0.0.1 localhost Check to see if its your firewall screwing things up. Turn it off and test. Turn it on and test.
I was facing the same problem. Go to ->windows->system32->etc->host remove-> ::1 localhost set-> 127.0.0.1 localhost save and restart apache. Hope it will work
oddly, I had exactly the same thing. Thanks for the solution. It would be interesting to know what caused it.
That's 127.0.0.1 expressed in IPV6 that happens when Vista loads TCPIP protocol version 6 in Networking components. It does that by default, but you can uncheck it as a component. The problem is that apache doesn't understand IPV6 I'm betting that ::1 was the first entry in the Hosts file, wasn't it? Removing all references to IPV6 is a good thing in most Redmond platforms. That being said, +why+ would you run Apache or any other "server" application on a desktop OS like Vista in the first place? It's hardly a stable sane platform for doing a website. Learn Linux. Centos, Fedora,Debian, Ubuntu, whatever. _way way way_ better of a web services platform.
ciscoguy thanks for your shared info. It really helped me. I'm developing a site on my local computer. And I use VIsta because sometimes I like to play some games. I know Linux and I know linux is much better for web platform but like I sad. I don't run my website from vista OS. Just develop them. Thanks again
Slightly off-topic, but don't I feel like a prat. About an hour ago I posted a similar question which has since been answered. Anyway, will you believe me that I did in fact attempt a search. First search term "localhost to 127.0.0.1" was told that I needed at least three words to search. Next search was "configure localhost", only two words but the search continued. Nothing stood out, did check a few threads. So I posted my question. Only now when not specifically searching for this topic did it stand out to me.
Hi, I had exactly this same problem (http://127.0.0.1 working but not http://localhost in Windows Vista), and solved it as you suggested. So, big thanks! I had a small problem to find the HOSTS file in Windows Vista, but it is at: C:\Windows\System32\drivers\etc Then I changed the line: to: Restarted the web server, restarted the browser, and it works!! Thanks for your help.
It works, I found the etc folder in the drivers folder under System32 as well. there was Hosts file, wich I opended with Notepad and changed the suggested line to 127.0.0.1 localhost. Just to clear it out as your great suggestion was still a bit difficult to follow for a novice like me Thank a lot. It works!!!