Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 have a portal on amazon ec2. Which Many domains and also cname's point to this server elastic IP. Like,,, *

now I want to take to behind load balancer. The main issue for me is when I take a request the content of portal is generated based on url entered. So programmatically and is also different for app.

How do I resolve this issue?

share|improve this question

migrated from Jul 12 '11 at 16:51

This question came from our site for professional and enthusiast programmers.

Initially an exact duplicate of Load Balancing in Amazon EC2 with multiple CNAME - I have previously edited the other question to tidy it up. – crb Jul 12 '11 at 18:50
up vote 1 down vote accepted

You can set your server software to use a virtual host and direct the requests to different document roots. Or, you can use whichever programming language you like and check the request's hostname parameter, adapting the page as necessary from that.

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.