AWS EC2 实例正在运行,但无法通过浏览器连接到它

发布于 2025-01-20 10:24:21 字数 934 浏览 0 评论 0 原文

我有一个在 EC2 实例上运行的 Nodejs 应用程序。我使用 Ubuntu 服务器 18.04 和节点版本 v16.x 使用以下链接安装了 Web 应用程序:

节点安装指南 v16.x

为了运行该项目,我使用了以下教程:教程链接

我面临的问题是,当我运行启动命令 npm start 时,我的应用程序使用端口 3000 在服务器上启动。但是每当我打开 AWS 提供的链接时,在我的例子中是: https://ec2-3-72-79-132.eu-central-1.compute.amazonaws.com 它没有响应。我看到了一些类似的问题,最常见的答案是编辑我所做的入站安全组。

输入图片描述在这里

但它仍然不起作用。我还尝试仅使用 http 访问链接,如下所示:

http://ec2-3-72-79-132.eu-central-1.compute.amazonaws.com:3000 但它仍然不起作用。任何帮助将不胜感激,因为我花了 2 天的时间来解决这个问题,但我发现我没有取得任何进展。

I have a nodejs app running on an EC2 instance. I installed the webapp using Ubuntu server 18.04 and node version v16.x using this link:

Node installation guide v16.x

To run the project I used the following tutorial: Tutorial link

The problem I am facing is that when I run the starting command npm start my app launches on the server using port 3000. But whenever I open the link provided from AWS which in my case is : https://ec2-3-72-79-132.eu-central-1.compute.amazonaws.com it doesn't respond. I saw some similar questions and most common answers were to edit the inbound security groups which I did.

enter image description here

But it still doesn't work. I also tried to access the link with http only like this:

http://ec2-3-72-79-132.eu-central-1.compute.amazonaws.com:3000 but it still doesn't work. Any help will be highly appreciated, because I spent 2 days struggling with this issue and I see that I don't make any progress.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文