Search code examples
amazon-web-servicesamazon-ec2dnsendpointvelo

How to connect existing domain to various ports on AWS EC2 server


I need some help to connect these dots, if possible:

I have an EC2 server on AWS (let's call it http://ec2-foo.compute.amazonaws.com/), with different servers on each port. So:

Also, I already have a domain outside Amazon (http://bar.com), which links to a Wix.com website. I would like to do the following:

I'm new at working with DNS and I would like some help to solve this specific problem. Is there a way to solve this? Would I need to create a main server to handle this? Which steps from AWS documentation should I follow in order to accomplish all of this?


Solution

  • To accomplish this you need a webserver such as Apache to proxy incoming requests to different ports. DNS alone is not sufficient because DNS doesn't specify destination ports. Take a look at this answer for an example: Apache redirect to another port