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

After changing the VirtualHost setting on httpd-vhosts.conf in my wampserver like this

<VirtualHost *:80>
     DocumentRoot “C:/wamp/www/project”
<VirtualHost *:80>

I cannot access my default index page of wamp. I got my homepage when I only type `http://localhost'.

Did I do something wrong when setup the virtual host?

share|improve this question

migrated from Jan 22 '13 at 8:38

This question came from our site for professional and enthusiast programmers.

up vote 0 down vote accepted

Check your httpd-vhosts.conf file (and other config file that you have put virtual host configs) to make sure that the first virtual host has the DocumentRoot is your default www folder.

In most case, adding this configuration on top of your httpd-vhosts.conf may helps:

<VirtualHost *:80>
     DocumentRoot “path/to/your/www/folder”
share|improve this answer
Thank you, it works, can you explain why it happened? – Khac Phong Bui Jan 21 '13 at 23:00

Your WAMP now knows what it should do when a request for comes in, but your computer still has no idea what is To tell it, you need to edit your hosts file (it's located in something like C:\Windows\System32\Drivers\etc for Windows XP), and add this at the bottom.

After this, your domain should be working.

share|improve this answer
Thank you, but my domain still works. My proplem is the localhost still point to the new "domain". – Khac Phong Bui Jan 21 '13 at 23:07
I assume you mean your computer resolves to, i.e., points to localhost. You never change localhost to anything in your resolver. – chris Jan 21 '13 at 23:19

You've duplicated the virtualhost tag in the config, instead of opening and closing it. Also make sure that actually resolves to your host, e.g., ping

share|improve this answer

You must log in to answer this question.