Add each domain name to the hosts file used by Windows XP, which is located in the C:\WINDOWS\system32\drivers\etc folder for a default installation(File name is hosts). An example configuration might be (comments on top not included for brevity):
127.0.0.1 localhost
127.0.0.1 lc.opensource.com # my personal site
127.0.0.1 lc.sunisland.com # my company’s site
Now add the below line at the end of file(httpd.conf) and create the file virtual-hosts.conf where the conf folder is located. (its in the apache2triad/conf)
Include conf/virtual-hosts.conf
Enter the data as below in the file : virtual-hosts.conf
<VirtualHost *:80>
ServerName localhost
DocumentRoot “D:/apache2triad/htdocs”
CustomLog logs/localhost.access.log combined
ErrorLog logs/localhost.error.log
</VirtualHost>
<VirtualHost *:80>
ServerName hitesh.opensource.com
DocumentRoot “D:/apache2triad/htdocs/opensource”
CustomLog logs/hitesh.opensource.com.access.log combined
ErrorLog logs/hitesh.opensource.com.error.log
</VirtualHost>