美文网首页
nginx 502-Bad gateway

nginx 502-Bad gateway

作者: Helong | 来源:发表于2017-07-20 10:50 被阅读203次

    前两天没及时续费阿里云服务器,续费后遇到ghost博客打不开了,记录一下问题解决.

    出现了问题如标题,首先查看一下nginx的error.log ,如下:

    connect() failed (111: Connection refused) while connecting to upstream, client: 121.28.144.94, server: www.longhe.xin, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:2368/", host: "www.longhe.xin"

    查看forever下ghost是否运行

    $ forever list

    问题:发现ghost未运行,  

    解决:进入ghost目录下(内有index.js),执行一下,forever设置ghost始终启动

    $ NODE_ENV=production forever start index.js

    尾语:  用了小半天才找到的问题,各种百度,谷歌,仅此记录一下吧,也希望其他人遇到了能帮助到.

    相关文章

      网友评论

          本文标题:nginx 502-Bad gateway

          本文链接:https://www.haomeiwen.com/subject/kajdkxtx.html