1

I have two web applications running on same ec2 instance at two different ports 8080 and 8443. Also I have bought a domain name in aws, can anyone tell me how to route the domain name to these applications with route 53.

I don't think I can use elb, as there is only one instance and also I don't wish to use elb at this point.

1

You can find instructions for configuring Route53 for EC2 instances here: Routing to EC2

As the two applications run on different ports you can simply use the same record or have two pointing to the same instance.

If however you want them to both be on the same port - e.g. both on port 80 - you could also attach a second ENI and map the applications to a specific interface: Using ENIs

Or you could install some kind of proxy on the instance to handle application routing. For example NGINX: NGINX

A nice example here: NGINX virtual hosts tutorial

Plus lots of other options. Depends a little on what you are trying to achieve.

  • Actually when I routed my ec2 instance with the domain...it's coming out smthg like abc.com:8080 and abc.com:8443 so I didn't get your point of two pointing – priyanka178 May 13 '18 at 8:28
  • What do you want it to be like? – Alex Moore May 13 '18 at 8:36
  • abc.com for application running on 8080 and abc.com/xyz for application running on 8443... – priyanka178 May 13 '18 at 9:02
  • In which case something like NGINX is your easy answer, I have updated the above with a link to a good tutorial which walks through installing NGINX and routing to different applications locally. – Alex Moore May 13 '18 at 9:38
  • @Fabian Those details revealed out when I tried what Alex suggested. – priyanka178 May 13 '18 at 11:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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