Creating A Local Domain Using Apache Virtual Hosts

Taken from here

The basic Virtual Host configuration we're seeking is as follows: NameVirtualHost *:80
 * 1) Setup Listening Port

 ServerName localhost DocumentRoot /var/www 
 * 1) Ensure "localhost" is preserved unchanged pointed
 * 2) to the default document root for our system.

 ServerName helloworld.tld DocumentRoot /home/padraic/www/helloworld/public
 * 1) Setup "helloworld.tld" Virtual Host

 Options Indexes FollowSymLinks Includes AllowOverride All Order allow,deny Allow from all  

and add to /etc/hosts (for this example)

127.0.0.1 helloworld.tld