Drop的IP地址访问我的网站

Drop的IP地址访问我的网站

本文介绍了无法使用我的Digital Ocean Drop的IP地址访问我的网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将我的MERN应用程序部署到Digital Ocean Droplet(Ubuntu 20.04服务器)上.

I am in the process of deploying my MERN app to a Digital Ocean droplet(Ubuntu 20.04 server).

我已经克隆了GitHub存储库,安装了依赖项和pm2.

I have cloned my GitHub repo, installed the dependencies and pm2.

我使用命令 pm2 start server/index.js 启动服务器.然后,当我访问URL http://134.122.112.22:5000 时,出现以下错误:为什么我无法访问我的网站?

I start the server using the command pm2 start server/index.js.Then when I visit the URL http://134.122.112.22:5000, I get the following error:Why am I not able to access my site?

* 请注意,我尚未购买域.另外我还没有安装NGINX.

我想念什么吗?

EDIT-1 我在防火墙中添加了HTTP入站规则.但是,我收到了同样的错误.

EDIT-1I added a HTTP inbound rule in the firewall. Yet, I am receiving the same error.

推荐答案

您缺少 Nginx .端口 80 已打开,但您尝试使用 5000 ,因此无法正常工作.

You are missing the Nginx. Port 80 is open but you are trying 5000, so won't work.

您可以在防火墙中打开端口 5000 ,还可以检查 ufw 防火墙.

You can open port 5000 in the firewall and also check ufw firewall.

ufw status

并使用命令打开端口

sudo ufw allow 5000

这篇关于无法使用我的Digital Ocean Drop的IP地址访问我的网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-10 22:48