This post includes a short snippet and some explanation about how you can use Virtual Hosts with Apache.