I installed Apache 2 on my Windows 7 box last week and all seemed to run fine. I had an issue where 'localhost' took a long time to load, but actually typing in the IP 127.0.0.1 in the address bar of my browser loaded my local websites instantly. I googled it and the solution was to comment out the IPv6 setting in the windows hosts file. Now typing 'localhost' in the address bar loads my local sites instantly.

I just added some virtual hosts in the httpd.conf file (and also to the windows hosts file) and now the virtual hosts take 4+ seconds to load. I opended the Net tab in firebug to see what part of the request was taking so long, and it shows 4.04 seconds to do the DNS lookup... I have googled and googled it and I am not sure what to do.

link|improve this question
are the vhost domains at the top of your hosts file? have you changed the listener or anything else related to ports? – davidosomething Jun 27 '10 at 1:50
feedback

1 Answer

It's supposed to be a Windows 7 conflict related with IPv6 and host resolving. There's an interesting post about this issue in this blog: http://cubicspot.blogspot.com/2010/07/fixing-slow-apache-on-localhost-under.html

In my case, I sped the thing up adding "127.0.0.1 localhost" to my hosts file. That did the trick.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.