How to serve many subdomains?

Also, this thread may be relevant: “Combining multiple domains”.

If I figure out how to put 100 domains in the same certificate then the problem would be solved.