连接到上游[nginx]时失败(13:权限被拒绝)

时间:2020-11-06 14:56:10

标签: django ubuntu nginx gunicorn ubuntu-18.04

我正在使用Nginx和Gunicorn配置Django项目。

我正在关注本教程:https://www.alibabacloud.com/blog/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04_594319

此nginx错误日志

2020/11/06 15:09:33 [crit] 13566#13566:* 1 connect()到Unix:/root/projectdir/automation/nacm.sock在连接到上游时失败(13:权限被拒绝),客户端:1xx.1xx.xx.xx,服务器:xxx.xxx.xxx.xx,请求:“ GET / HTTP / 1.1”,上游:“ http:// unix:/root/projectdir/automation/nacm.sock: /”,主机:“ xxx.xxx.xxx.xx”

这是我的gunicorn.service

[Unit]
Description=gunicorn daemon
After=network.target

[Service]
User=root
Group=www-data
WorkingDirectory=/root/otomasiJaringan/automation
ExecStart=/root/otomasiJaringan/env/bin/gunicorn --access-logfile --workers 3 --bind unix:/root/projectdir/automation/nacm.sock nacm.wsgi:application

[Install]
WantedBy=multi-user.target

此网站可用/独角兽

server {
listen 80;
server_name xxx.xxx.xxx.xx;

location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
    root /root/projectdir/automation/website;
}

location / {
    include proxy_params;
    proxy_pass http://unix:/root/projectdir/automation/nacm.sock;
}

在HTML页面中,我得到502 Bad Gateway。

我在做什么错?

0 个答案:

没有答案
相关问题