Nginx, django, gunicorn, ubuntu 14.04 (13: в доступе отказано) при подключении к апстриму
Я работаю над своимdjango
проект сnginx
а такжеgunicorn
как тут сказано:
Мой сайт работает локально, но когда я начинаюnginx
а такжеgunicorn
сервер у меня был
502 Ошибка шлюза.
ОС естьUBUNTU 14.04
Я пытаюсь заставить свой проект работать, и переустановить все как root (я знаю, что это плохо) - та же ошибка.
Вот мой "error.log":
2016/04/20 20:15:10 [crit] 10119 # 0: * 1 connect () для
unix: /root/myproject/myproject.sock не удалось (13: разрешение отклонено) при подключении к восходящему каналу, клиенту: 46.164.23
Когда я запускаю команду "nginx
«:
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
Мой gunicorn.conf
description "Gunicorn application server handling myproject" start on runlevel [2345] stop on runlevel [!2345] respawn setuid root setgid www-data chdir /root/myproject exec myprojectenv/bin/gunicorn --workers 3 --bind unix:/root/myproject/myproject.sock myproject.wsgi:application
Это мой "/ etc / nginx / sites-available / myproject"
server {
listen 80;
server_name www.mysite.ru;
error_log /nginx_error.log;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
root /root/myproject;
}
location / {
include proxy_params;
proxy_pass http://unix:/root/myproject/myproject.sock;
}
}
Я буду очень признателен за вашу помощь !!!