我有一个在 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.

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.
发布评论