Apache2 and subdomains

Hi everyone,

I’ve set up rails to use dynamic subdomains with the account location
plugin. And on my dev box I’ve been able to get the result I require
by modifying my hosts file. user1.myapp.com user2.myapp.com

However my question is, on the production server, if I want
user1.myapp.com and user2.myapp.com ,etc to work , does this require
an apache2 ServerAlias?
something like ServerAlias *.myapp.com?

I’m not to familiar with the apache2 configuration.
Any help would be appreciated.