linux - Cannot connect to EC2 Instance through HTTP -


i'm having trouble accessing website through http ec2 instance. i've tried changing security setting allowing http on port 80, still doesn't work. ssh working fine. issue?

this embarrassing, reason couldn't connect ec2 instance because node js app never started server me listen on port 80.

adding simple snippet of code

var server = app.listen(8080, function () {    var host = server.address().address   var port = server.address().port    console.log('example app listening, host, port)  }) 

along shell command redirecting fixed issue.

iptables -t nat -a prerouting -p tcp --dport 80 -j redirect --to 8080 

Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -