What is the best way to configure Apache or AWS to support a Rails multi tenancy application that allows each customer to have their own domain name?
- by Ryan Arneson
I'm building a Rails 3 SaaS site that allows for multi-tenancy.
When a customer signs up they put in their own domain name, e.g. example.com. I need example.com to point to my SaaS application and serve them their content.
My questions are as follows:
Do I need to create an Apache vhost for each customer using their own domain?
Is there an easier way with CNAME's to just have the customer point to the IP address of my server(s) that then forwards the request onto my application through some catch all vhost?
Would I be able to create the CNAME record for the customer so they don't have to do any setup?
Would this be a case better suited to Amazon Web Services?
Any help or explanation or corrections on my understanding of dns would be appreciated. I'm a developer so the server ops portion of this is a bit cloudy.