Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 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.

share|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

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:

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

share|improve this answer
Can you expand on what's on the link? If that site goes down, this answer is essentially on line, not explaining much – Canadian Luke Oct 3 '15 at 23:42

just to let documented,

First of all always modify the Windows hosts (C:\Windows\system32\drivers\etc\hosts) file with any text editor (Notepad++), adding your IP and references, including your vhosts addresses. localhost

And what most people forget, if you are running vhosts with domains, and your server is in the same LAN you are, you must modify your client hosts file and add those lines, but pointing to your server LAN IP, otherwise when your browser lookup the DNS for the domain, you will be redirected to your router.

Remember to configure your VHOSTS.conf file correctly as well, adding document roots and other parameters for each vhosts.. Try checking up for vhosts guides

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .