How to add virtual host in apache on Windows 7

Here is what I did:

Host file

Location:C:\Windows\System32\drivers\etc\HOSTS

Add line below localhost:

 Apache

Location:E:\xampp\apache\conf\extra\httpd-vhosts.conf

Add following content:

Restart the server. Then you can open them in browser now.

Here is another sample for more settings