I really like Basecamp's idiom of "dynamically" creating custom virtual hosts for clients -- for instance, once a company has signed up they may quickly login to a special URL like:
https://mystartup.basecamphq.com/
--which I think is really neat, it segregates multiple organizations nicely within a single application. My question is: assuming I've got control of a given domain, is there an easy way to do this kind of black magic with Rails and Nginx -- that is, to dynamically create a virtual host?