无法修复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.