Reputation: 7562
I hosted a nodejs(express hello world app) application on AWS Linux(Ubuntu 16.04) on free-tier. When i do wget http://localhost:8080
it runs successfully and saved the output in index.html file.
But when i do the same thing with the public ip (wget http://35.154.40.189:8080
) of my instance, it says
Connecting to 35.154.40.189:8080... failed: No route to host.
I also used the steps given in http://www.lauradhamilton.com/how-to-set-up-a-nodejs-web-server-on-amazon-ec2 to forward all ipv4 traffic to my application but it doesn't work.
I also enabled port 8080 from aws console.
netstat -atn says
netstate -ntlp says
I tried everything which i get on internet but unable to resolve the issue. Now i'm too much frustrated. Any help would be highly appreciable.
Upvotes: 0
Views: 455
Reputation: 60144
Enable inbound rule as u mention in picutre
Enable user group after ssh connection with AWS ubuntu instance
sudu apt-get update
sudo apt-get install libssl-dev g++ make
node.tar.gz
wih command wget link
https://nodejs.org/dist/v6.9.1/node-v6.9.1.tar.gztar -xvf node -v0.10.32.tar.gz
./configure && make && sudo make && sudo make install
boom your node server is ready on new AWS instances
or watch this https://www.youtube.com/watch?v=WxhFq64FQzA&t=1693s
Upvotes: 1