无法修复NGINX 502:Digital Ocean Droplet上的网关错误-Ubuntu 20.04 [英] Unable to fix NGINX 502: Bad Gateway error on a Digital Ocean droplet - Ubuntu 20.04

查看:75
本文介绍了无法修复NGINX 502:Digital Ocean Droplet上的网关错误-Ubuntu 20.04的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将网站部署到Digital Ocean Droplet(Ubuntu 20.04服务器)上.

I have deployed my website to a Digital Ocean droplet (Ubuntu 20.04 server).

一切正常.今天,我在本地计算机上对网站做了一些更改.因此,我将更改推送到GitHub,然后再次将GitHub存储库克隆到服务器.然后,我安装了依赖项并重新启动了PM2.

Everything was working fine. Today, I did some changes to the website in my local machine. So I pushed the changes to GitHub and then cloned the GitHub repo again to the server. Then, I installed the dependencies and restarted PM2.

现在,当我访问我的网站 https://sundaray.io 时,出现以下错误.

Now, when I visit my site https://sundaray.io, I get the following error.

以下是错误日志.

如何解决该错误?

推荐答案

简单的意思是

No HTTP server response, your Node Http server is not answering requests.

502网关意味着服务器和Nginx收到了您的请求,但是上游出现了问题.

502 gateway mean server and Nginx is getting your request but there is issue with upstream.

您可以使用该命令显示pm2的日志

you can use the command to show the logs of pm2

pm2 show

应用程序可能崩溃或内部服务器500错误.

the application might be crashing or internal server 500 error.

这篇关于无法修复NGINX 502:Digital Ocean Droplet上的网关错误-Ubuntu 20.04的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆