Answer the question
In order to leave comments, you need to log in
Deploy Django: nginx + guricorn?
Good afternoon! I'm trying to figure out why the socket file is not being created in the directory and with the project, but all my efforts have been unsuccessful. I did everything according to the tutorial: tyts .
But when starting the project, I get the following problems: sudo tail -f /var/log/nginx/error.log
2017/01/09 12:55:14 [crit] 3800#3800: *1 connect() to unix:/home/dikiigr/posuda_shop/engine/posuda_shop.sock failed (2: No such file or directory) while connecting to upstream, client: 178.132.120.66, server: 89.223.28.112, request: "GET / HTTP/1.1", upstream: " http://unix:/home/dikiigr/posuda_shop/engine/ posud... ", host: "89.223.28.112" sudo systemctl status gunicorn.service
● gunicorn.service - gunicorn daemon
Loaded: loaded (/etc/systemd/system/gunicorn.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2017-01-09 12:39:12 UTC; 24min ago
Main PID: 2860 (gunicorn)
Tasks: 4 (limit: 512)
CGroup: /system.slice/gunicorn.service
├─2860 /home/dikiigr/posuda_shop/env/bin/python3 /home/dikiigr/posuda_shop/env /bin/gunicorn --wo
├─2864 /home/dikiigr/posuda_shop/env/bin/python3 /home/dikiigr/posuda_shop/env/bin/gunicorn --wo
├─2866 /home/dikiigr/posuda_shop/env/bin /python3 /home/dikiigr/posuda_shop/env/bin/gunicorn --wo
└─2867 /home/dikiigr/posuda_shop/env/bin/python3 /home/dikiigr/posuda_shop/env/bin/gunicorn --wo Configuration
file guricorn:
[Unit]
Description=gunicorn daemon
After=network.target
[Service]
User=dikiigr
Group=www-data
WorkingDirectory=/home/dikiigr/posuda_shop/engine
ExecStart=/home/dikiigr/posuda_shop/env/bin/gunicorn --workers 3 --bind unix:/home/dikiigr/posuda_shop/engine/posuda_shop.sock posuda_shop.wsgi:application
[Install]
WantedBy=multi-user.target
server {
listen 80;
server_name 89.223.28.112;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
root /home/dikiigr/posuda_shop/engine;
}
location / {
include proxy_params;
proxy_pass http://unix:/home/dikiigr/posuda_shop/engine/posuda_shop.sock;
}
}
la -la
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question