Welcome to WebmasterWorld Guest from 22.214.171.124
Forum Moderators: bakedjake
www.test.mysite.com needs to point to the same ip as test.mysite.com does. How you accomplish this depends on whether you run your own name server, if so which one it is, and if not how your ISP allows you do modify DNS data.
Then you need to configure your virtual hosts on Apache. How you do this is quite variable depending on what you are doing. If you have a different IP for each distinct site you are hosting, then do something like:
This will make Apache serve different content based on which IP you connect on. Apache won't care if you hit that IP by calling it test.mysite.com or www.test.mysite.com.
If you don't have multiple IPs at your disposal, you can use NameVirtualHost. I'm not sure if you have to define multiple NameVirtualHost sections, one for each name, or whether you can list multiple names. I don't have any NameVirtualHost sections in my own config right now, because they are incompatible with SSL, and all my domains have SSL support.