For subdomains, you can set up a wildcard certificate.
For different domains, you might want to set up multiple virtual hosts, so you can apply different SSL certificates.
If you have a test server, can test the virtual host script, which generates virtual hosts much more quickly and easily...