I have the grasp of setting up multiple name-based domains on Apache 2 using virtual hosts. Say I have a domain name called 'domain.com'. I now want to set up a sub domain of this, like 'demo.domain.com' and want this to go to a different folder on Apache to serve up a different website.
How would I set this up exactly? Do I need to set up a CNAME and then a virtual host in Apache? Or do I just setup a ServerAlias in Apache? I'm a little confused.
I'm using Slicehost for my hosting and DNS, if that helps. Using Ubuntu Hardy with Apache 2.