I'm using the popular subdomain-fu for subdomain functionality in my Rails app. I've watched the Railscast and read everything I could find through google.
In the dev environment, you need to manually add the available subdomains to the /etc/hosts file. I get that. But how does this work in production? This seems to be considered so obvious that nobody mentions it anywhere. But I guess I don't get it.
Clearly, it must be possible to set up a dynamic solution in production or else subdomains couldn't scale at all, but I'm not sure exactly what I need to do. I'm running Apache + Passenger on an Ubuntu box. I've set up a wildcard ServerAlias in my vhost file like this:
ServerAlias *.example.com.
But I'm not sure what else I need to do in order for my subdomains to resolve correctly. Any guidance about the standard approach to this would be much appreciated.