skip to Main Content

I have a node server running on an ec2 instance with AWS from port 3000 as the ec2-instance accessed through putty doesn’t let me use port 80 which I assume is because it is already in use from something else. I’ve registered a domain and realise I need to include the port 3000 as part of the url, like example.com:3000/.

However I would like to not have the port number in the url.

I have tried using a load balancer and target group to route traffic from port 80 to 3000 however it doesnt seem to be working. It could be that I have not set up the load balancer and target group correctly. Can anyone tell me the way to set up a load balancer like this? Or another way to remove the port number?

I have set up the load balancer as follows:

  • Load balancer has listener on port 80 which points to target group
  • This target group is on port 80 with a target pointing to my ec2-instance at port 3000

Load Balancer Setup

Target Group Setup

2

Answers


  1. Chosen as BEST ANSWER

    Wasn't able to use a load balancer to redirect traffic to port 80 to 3000 so if anyone still has advice it would still be appreciated.

    If you simply want to not need the port number in the url, I was able to do it with the help from this answer posted on another thread.

    Cheers.


  2. Set the target group to listen to port 3000, LB port 80 just means you receive only http. So you receive http on LB and the target group port is 3000.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search