Question

I´m trying to config a website hosted in AWS EC2 instance. But Im a bit mixed!!

I have an AngularJS application running in a Node.js server listening on port 1234. This site is deployed correctly, so when I get the url in a browser ec2-instance-public-dns:1234/app/index.html I see my site perfectly.

In the other hand, I registered a domain name in GoDaddy. I set up a Route 53 and the DNS names in GoDaddy.

I see, I also have a load balancer listening in port 80, that is redirecting to port 1234.

What I need is to link my domain with my site in the path ec2-instance-public-dns:1234/app/index.html

All this stuff is not working. How can I achieve this?

Was it helpful?

Solution

  • Is there is reason why you don't have Node listen to 80 or 8080 ?
  • Does the DNS redirection work ? -> Can you access your site with www.yourdomainname.com:1234 ? -> If no, then check your dns config, you should not have to deal with port routing at that level.
  • Are you using Linux as your EC2 instance ? If yes, reroute port 80 toward port 1234 as explained here (http://www.cyberciti.biz/faq/linux-port-redirection-with-iptables/).

That how I do it, hope that helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top