Solved Cannot connect to my remote HTTP server

I have installed a FreeBSD10 instance on Amazon EC2.
By using pkg I have also installed nodejs, npm.

I have put a simple HTTP server code in my directory:
/usr/ec2-user/app1/index.js
with code:
Code:
var koa = require('koa');// is an http app framework
var app = koa();

app.use(function * () {
    this.body ='Hello World';
});

app.listen(3000);

But I cannot connect to it from my browser using its public IP
Code:
http://<publicIP>:3000

The same HTTP server setting works successfully locally on my Mac.

What is the thing I am missing here?
 
Got it.
I have added rules to my security group related to my FreeBSD instance.
Form the console AWS supplies I have added an HTTP rule for TCP protocol to allow port 80 (changed index.js code accordingly) to be reached anywhere i.e. 0.0.0.0/0.
 
Back
Top