[英]502 bad gateway on Ngnix+Gunicorn+Django configuratoin
我正在digitalocean上部署django webapp,并且正在使用Nginx和Gunicorn。
当我打开网址时,它显示502错误的网关。
在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配置错误? 如何解决?
您需要在/etc/init/gunicorn.conf中正确设置gunicorn的配置。
请注意:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.