I have a site that has many subdomains (one for each client). The content for each subdomain will be different, pulling different data, different layouts etc, so I don't think I can just alias one directory to many different sub domains. My question is, what's the best practice for doing this? Each subdomain will need SSL. My setup is
- Amazon EC2 (ubuntu)
- Wildcard SSL for my domain (*.mydomain.com)
- Apache 2
- PHP (LAMP)
Currently, I'm just creating a new entry into "/etc/hosts" and an appropriate spot in the web root (ie /var/www/abc.mydomain.com, /var/www/def.mydomain.com, etc). I've just discovered that I'll need a unique IP for each subdomain, and that's tricky with EC2 as they limit you to the number you can have (unless you jump through some hoops). Right now I have about 10 subdomains, which is manageable, but theoretically I could have thousands.
Am I doing it the only way possible or is there a better way I should investigate?