无法从公共ip访问AWS Linux(Ubuntu)托管的应用程序 [英] AWS Linux (Ubuntu) hosted application is not accessible from public ip

查看:118
本文介绍了无法从公共ip访问AWS Linux(Ubuntu)托管的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在免费层的AWS Linux(Ubuntu 16.04)上托管了一个nodejs(express hello world app)应用程序.当我执行wget http://localhost:8080时,它将成功运行并将输出保存在index.html文件中. 但是,当我使用实例的公共IP(wget http://35.154.40.189:8080)做同样的事情时,它会说

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.

我还使用了 http://www.lauradhamilton.com/how-to-set-up-a-nodejs-web-server-on-amazon-ec2 将所有ipv4流量转发到我的应用程序,但它没有不行.

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.

我还从aws控制台启用了端口8080.

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.

推荐答案

  • 首先在AWS中创建实例
  • 启用picutre中提到的入站规则

    • MAke Your Instance in AWS first
    • Enable inbound rule as u mention in picutre

      在与AWS ubuntu实例ssh连接后启用用户组

      Enable user group after ssh connection with AWS ubuntu instance

      在新的AWS实例上为节点服务器准备好

      boom your node server is ready on new AWS instances

      或观看此 https://www.youtube.com/watch? v = WxhFq64FQzA& t = 1693s

      这篇关于无法从公共ip访问AWS Linux(Ubuntu)托管的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆