amazon-web-services - 简单的 npm 站点显示无法访问此站点

标签 amazon-web-services ubuntu

我的简单网站突然无法访问!!它使用 Ubuntu 托管在 AWS EC2(免费套餐)中。该网站正在使用网站根目录中的“npm start”运行。该站点显示“无法访问此站点”。我为 0.0.0.0/0 和::/0 的端口设置了安全组。如果我登录 EC2 框并 curl 公共(public) DNS IP 地址,我会得到我期望的 html,但不会在我的浏览器中远程获取!?

有谁知道我可以在 EC2 机器上或本地运行哪些命令来跟踪我的请求是进入 EC2 还是突然出现什么问题?我试过以下

$ lsof -t -i :3000 (no process found)
$ npm start 
$ lsof -t -i :3000 (process found ~ 6205)
$ curl ec2-1-2-3-4.eu-west-1.compute.amazonaws.com:3000

我的根文件夹文件结构如下所示
  • README.md
  • awscli 包
  • 构建.sh
  • 包锁.json
  • 公众
  • 构建
  • 节点模块
  • 包.json

  • 非常感谢,

    更新(在 EC2 上运行 wget 之后)
    wget ec2-1-2-3-4.eu-west-1.compute.amazonaws.com:3000
    --2019-03-20 23:42:04--  http://ec2-1-2-3-4.eu-west-1.compute.amazonaws.com:3000/
    Resolving ec2-1-2-3-4.eu-west-1.compute.amazonaws.com (ec2-1-2-3-4.eu-west-1.compute.amazonaws.com)... ec2-1-2-3-4
    Connecting to ec2-1-2-3-4.eu-west-1.compute.amazonaws.com (ec2-1-2-3-4.eu-west-1.compute.amazonaws.com)|ec2-1-2-3-4|:3000... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 2245 (2.2K) [text/html]
    Saving to: ‘index.html’
    
    index.html                            100%[=======================================================================>]   2.19K  --.-KB/s    in 0s
    
    2019-03-20 23:42:04 (343 MB/s) - ‘index.html’ saved [2245/2245]
    

    最佳答案

    I just stopped my work VPN to see and it works now?



    工作网络阻止不寻常的端口是很常见的。这似乎是你的问题。

    关于amazon-web-services - 简单的 npm 站点显示无法访问此站点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55271129/

    相关文章:

    file - 将近 40 万张图像传输到 S3 的最有效方法

    ios - AWS S3 HeadObject 无法解析 Dispatch_Once

    linux - 如何检查程序在 Linux 上是否安装成功?

    java - 无法在 Ubuntu 上运行 javac

    ubuntu - 如何使用 dllimport 解决 DllNotFoundException? (单声道)

    linux - 如何以这种文件结构生成 DEBIAN/md5sums 文件?

    postgresql - 如何启用将所有查询记录到 postgreSQL AWS RDS 实例?

    amazon-web-services - 如何防止访问 Aws CloudFront 中的路径

    mysql - Siteground 托管到 AWS RDS 连接花费太多时间

    ubuntu - Apache Spark 2.1.0 - 基本设置 : worker node not connecting with master node