Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I trying to setup as part of a study a PaaS (Platform as a service) for Ruby on Rails applications. I have already played with Amazon EC2 and Chef creating EC2 instances based on Chef's recipes and roles.

Now I need to be able to give every "customer" account or every app a unique subdomain like,, etc. which points to my customer's app on an EC2 instance. I then need to allow the customer to point their domain to their customized subdomain (,

Can someone explain to me how I can achieve that?

share|improve this question

It's a Simple Matter Of Programming. You should have something that maps customers to instances, like a database (assuming you're not going to run everything through a single frontend proxy) and then a script or whatever to generate the DNS zone from that data.

share|improve this answer

We wrote a cookbook for dynamically setting DNS entries in DynDNS Inc's Dynect API.

You could also use one of our published cookbooks for djbdns, powerdns or unbound.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.