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?

Posted by Ryan Arneson on Server Fault See other posts from Server Fault or by Ryan Arneson
Published on 2014-08-14T18:10:42Z Indexed on 2014/08/23 4:22 UTC
Read the original article Hit count: 454

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.

© Server Fault or respective owner

Related posts about apache-2.2

Related posts about dns