Adding virtual host wamp server windows xp

by admin on August 26th, 2010

here is the solution:
open:
c:\wamp\apache\apache2.2.8\bin\conf\httpd.conf
add this at the end of this file
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot “e:/testsite/”
ServerName testsite
</VirtualHost>
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot “e:/”
ServerName localhost
</VirtualHost>
and now open:
C:\WINDOWS\system32\drivers\etc\hosts
add this at the end
127.0.0.1       localhost
127.0.0.1       testsite
Restart your wamp, and you can use your testsite using
http://testsite and other projects  you can open normal like this:
http://localhost
I hope it will helps. Any doubt plz ask. 🙂
Thanks!
N

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>