What is Virtual Hosting?
Virtual Hosting is a technique by which web servers can serve more than one domain name on the same server. It can also be a variation of serving different sites on the same IP but on different ports.
If Ubuntu, you may need to edit
i) /etc/hosts
ii) /etc/apache2/conf.d/vhosts.conf (or /etc/apache2/sites-available/default) depending on how you have configured the virtual host environment
If CentOS, you may need to edit
i) /etc/hosts
ii) /etc/httpd/conf/httpd.conf
For listening to different ports Listen directive should be added to /etc/httpd/conf/httpd.conf file
References:
http://en.wikipedia.org/wiki/Virtual_host
http://apptools.com/phptools/virtualhost.php (For configuring Apache server on Windows)