I am building office management software on a LAMP server on a SAAS model. My clients typically have 5-10 thousand customers they are tracking with all of their contact, invoicing, appointment information. I want to keep each clients information in a separate Database. This I believe will in the long run improve performance, ensure better separation of data, and be cleaner.
So what I want to have happen is for company1.mysite.com and company2.mysite.com to both point to the same site, but pass on their subdomain as a parameter to php.
How do I use apache and vhosts to pass on the subdomain as a parameter to php while still using the same application for all subdomains.