[wd_asp elements=’search’ ratio=’100%’ id=1]

How to add a Virtual host – httpd file

26th June 2013

Windows

windows-codehaven

Add this to the bottom of the httpd.conf file (apache folder)
NameVirtualHost 127.0.0.1

DocumentRoot "C:\wamp\www\clienta"
ServerName clienta


DocumentRoot "C:\wamp\www\clientb"
ServerName clientb

and this to the hosts file (C:\Windows\System32\drivers\etc)

127.0.0.1 clienta
127.0.0.1 clientb

Restart apache, and just type clienta and see the files in that folder prefererably index.html
If you have this in the top of httpd.conf : – Listen 127.0.0.1:3700
then you will have to add clienta:3700 to your url and your code will be like this: –
NameVirtualHost 127.0.0.1:3700


DocumentRoot "C:\wamp\www\PPC"
ServerName ppc


DocumentRoot "C:\wamp\www\telematics"
ServerName telematics