我正在 digitalocean 上部署一个 django webapp,我正在使用 Nginx 和 Gunicorn。
当我打开我的网址时,它显示 502 bad gateway。
在 nginx_errors.log 中,我发现以下错误消息:
[error] 12229#0: *1 connect() to unix:/home/demo/webapps/hello/run/gunicorn.sock failed (111: Connection refused) while connecting to upstream, client: 123.45.6.78, server: demohello.com, request: "GET / HTTP/1.1", upstream: "http://unix:/home/demo/webapps/hello/run/gunicorn.sock:/", host: "demohello.com"
是不是因为我的nginx配置不对?如何解决?