Add virtual hosts

Hi.
I have wamp installed in my pc and now i want to create a virtual host for a site i am making.
I have done it but now everytime i type localhost it is redirecting to the virtual host i created instead of the default wamp page
I want to go to the wamp starter page and be able to launch other sites that dont have virtualhosts configured like localhost/site1 …

I want the following:
localhost -> normal usage. Shows wamp start page etc.
sitename.com -> redirect to the virtualhost.

How can i do it?

popo,

What? You want your online domain to be redirected to your VirtualHost? How are you ever going to check your website?

Okay, two things:

Using WAMP is a problem as the creator of our installation package has probably changed the files around. Better, IMHO, to install the daemons separately (aka Kevin Yank’s book).

  1. Based on the Apache.org install, edit the httpd.conf to uncomment the include statement for httpd-vhosts.conf. In httpd-vhosts.conf, add
<VirtualHost 127.0.0.1:80>
ServerName dk
DocumentRoot {local_path/to/dk}
ServerPath {local_path/to/dk}
</VirtualHost>
  1. In your hosts file (windows/system32/drivers/etc/hosts), add
127.0.0.1 dk

Obviously, replace dk with your LOCAL domain name and {local_path/to/dk} is something like my W:/datakoncepts.com

THEN restart Apache for the changes to be read.

I call my local domain with http://dk just like you’ve been asking for http://localhost.

Regards,

DK