【问题标题】:The Nginx server returns error 502 for some directories (Express Application)Nginx 服务器为某些目录返回错误 502 (Express Application)
【发布时间】:2020-11-26 11:35:31
【问题描述】:

我正在 Ubuntu 上使用 nginx Web 服务器运行一个快速应用程序。一切正常,但是今天当我使用 app.get 方法添加了两个目录并重新部署我的应用程序时,新目录将不起作用,它返回 502 Bad Gateway 错误(旧目录工作正常)。重新启动 pm2、nginx 和服务器本身并没有帮助。我该怎么办?

【问题讨论】:

标签: node.js express ubuntu nginx pm2


【解决方案1】:

几个小时后,我意识到问题出在我的代码中,与 nginx 无关。但是由于 pm2,服务器不会崩溃以帮助我找出答案。 运行正常运行命令:

node server.js

揭露了错误

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-09-11
    • 1970-01-01
    • 1970-01-01
    • 2020-11-12
    • 1970-01-01
    • 2015-07-16
    • 1970-01-01
    • 2020-06-28
    相关资源
    最近更新 更多