我正在将我的 MERN 应用程序部署到 Digital Ocean Droplet(Ubuntu 20.04 服务器)。
我已经克隆了我的 GitHub 存储库,安装了依赖项和 pm2。
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
I added a HTTP inbound rule in the firewall. Yet, I am receiving the same error.
你错过了Nginx. Port 80已开放,但您正在尝试5000,所以不会工作。
你可以打开端口5000在防火墙中并检查ufw防火墙。
ufw status
并使用命令打开端口
sudo ufw allow 5000
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)