Получаю ошибку 502, вот журнал nginx:
2015/09/04 15:25:31 [error] 1563#0: *1 connect() to unix:/home/90158/test/test.sock failed (111: Connection refused) while connecting to upstream, client: 142.29.143.200, server: hackerspace.sd72.bc.ca, request: "GET / HTTP/1.1", upstream: "http://unix:/home/90158/test/test.sock:/", host: "hackerspace.sd72.bc.ca"
Я новичок в nginx / gunicorn, и мне нужно знать, что я могу сделать дальше, чтобы устранить эту проблему.
/home/90158/test/test.sock
существуют.
вот мой файл конфигурации nginx:
server {
listen 80;
server_name hackerspace.sd72.bc.ca;
access_log /var/log/nginx/test.access.log;
error_log /var/log/nginx/test.error.log;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
root /home/90158/test/src;
}
location / {
include proxy_params;
proxy_pass http://unix:/home/90158/test/test.sock;
}
}
и вот мой файл с конфигом gunicorn:
description "Gunicorn application server handling test_project"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
setuid 90158
setgid www-data
chdir /home/90158/test
exec bin/gunicorn --workers 3 --bind unix:/home/90158/test/test.sock src/test_project.wsgi:application
Что я делаю не так?
Следующие шаги по устранению неполадок:
За unix
(7), ECONNREFUSED
может быть возвращен connect
(2) если сокет не является «слушающим сокетом» - неуклюжий способ сказать «что-то слушает». «Эта ошибка также может возникнуть, если целевое имя файла не является сокетом».