using amazon ec2 and binding the IP with instance, but not working

amazon-ec2

Solution

You need to make sure your security group has the right ports open.

To do this, do the following:

- Select "Security Groups" in the "NETWORK & SECURITY" section on the left side of the screen.

- Select the security group you have assigned to your EC2 instance.

- Select the "Inbound" tab in the bottom panel.

- Add the port you want to open and the range of addresses that can access it.

For example add this:

Port range: 80
Source:     0.0.0.0/0

In order to open the standard port for HTTP from any IP address.

If you are using a load balancer you will also need to open the port there too:

- Select "Load Balancers" in the "NETWORK & SECURITY" section on the left side of the screen.

- Select the Load balancer pointing to your EC2 instance.

- Select the "Listeners" tab in the bottom panel.

- Add the protocol/port you want to open and the protocol/port it will be applied to on the server.

For example add this:

Load Balancer Protocol: HTTP
Load Balancer Port:     80
Instance Protocol:      HTTP
Instance Port:          8080

If you want to redirect incoming port 80 requests to port 8080 on your instance.

If you do this there will need to be a rule on the EC2 instance's security group to allow incoming connections to 8080 from elastic load balancers like this:

Port range: 8080
Source:     amazon-elb/amazon-elb-sg

Problem

I am new to the amazon service, I have installed the node.js and mongodb on the amazon EC2, it all worked on the server side, however, when I wanted to test it, I binded the server instance with IP address, but visiting the server was not successful, I wanted to know what was wrong with it

Original source