无法连接到 mysocket.sock,连接被拒绝(gunicorn、nginx)

无法连接到 mysocket.sock,连接被拒绝(gunicorn、nginx)

完整错误:

2018/03/12 04:59:08 [error] 1562#1562: *1787 connect() to unix:/home/mik
e/movingcollage/movingcollage.sock failed (111: Connection refused) whil
e connecting to upstream, client: 107.205.110.154, server: movingcollage
.com, request: "GET / HTTP/1.1", upstream: "http://unix:/home/mike/movin
gcollage/movingcollage.sock:/", host: "movingcollage.com"

我的配置没问题,以前可以正常工作;我提取了一些新的应用程序代码,现在出现了 502 错误网关错误(提取应用程序代码之前,网站运行正常)。我已经提取了service gunicorn restartsystemctl restart gunicorn现在仍然出现 502 错误网关错误。有人能帮忙吗?

这是一个 django 项目,值得一试。

Gunicorn 配置:

description "Gunicorn application server handling movingcollage"

start on runlevel [2345]
stop on runlevel [!2345]

respawn
setuid user
setgid www-data
chdir /home/mike/movingcollage

exec movingcollageenv/bin/gunicorn --workers 3 --bind unix:/home/user/myproject/movingcollage.sock movingcollage.wsgi:application

编辑:我已将最后一行更改为exec movingcollageenv/bin/gunicorn --workers 3 --bind unix:/home/mike/movingcollage/movingcollage.sock movingcollage.wsgi:application,但仍然不起作用。请注意,前一行曾经工作正常

相关内容