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
Post a Comment