Reputation: 8080
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
Upvotes: 2
Views: 2377
Reputation: 5122
You need to make sure your security group has the right ports open.
To do this, do the following:
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:
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
Upvotes: 7