Originally Posted by acid_kewpie
DNS and hosts file just achieve the same objective in different ways. a subdomain virtual host is totally possible, it's not "interesting" per se. Sounds like you maybe aren't matching the virtualhost in Apache with a wildcard or something?
In /etc/hosts i tried : IP test.example.com entry and i tried pinging which did not work.
IP to example.com entry in /etc/hosts works just fine but when i try with sub-domain it doesn't work.
How can i get the sub-domain entry point to my localmachine so that apache than can read it for Virtual Hosts directive.