Eu estou criando um aplicativo django usando o nginx como meu servidor com o uwsgi. No entanto, quando eu entrei no meu domínio ou endereço IP para acessar meu site. Eu tenho um 502 BAD GATEWAY ERROR. Então, decidi olhar meus logs para ver se cometi um erro porque estava seguindo o tutorial do Oceano Digital.
Arquivo Nginx
server {
listen 80;
server_name 173.212.203.105;
error_log /root/logs/error.log;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
root /root/muzillasite;
}
location / {
include uwsgi_params;
uwsgi_pass unix:/run/uwsgi/muzillasite.sock;
}
}
Uwsgi ini
[uwsgi]
project = muzillasite
base = /root
chdir = %(base)/%(project)
home = %(base)/%(project)
module = %(project).wsgi:application
master = true
processes = 5
socket = %(base)/%(project)/%(project).sock
chmod-socket = 664
vacuum = true
Uwsgi conf
description "uWSGI application server in Emperor mode"
start on runlevel [2345]
stop on runlevel [!2345]
setuid root
setgid www-data
exec /usr/local/bin/uwsgi --emperor /etc/uwsgi/sites
Erros
uwsgi.service - uWSGI Emperor service
Loaded: loaded (/etc/systemd/system/uwsgi.service; enabled; vendor preset: enabled)
Active: failed (Result: start-limit-hit) since Sun 2017-01-15 22:57:00 CET; 2s ago
Process: 1127 ExecStart=/usr/local/bin/uwsgi --emperor /etc/uwsgi/sites (code=exited, status=203/EXEC)
Process: 1122 ExecStartPre=/bin/bash -c mkdir -p /run/uwsgi; chown root:www-data /run/uwsgi (code=exited, status=0/SUCCESS)
Main PID: 1127 (code=exited, status=203/EXEC)
Registros de erros
2017/01/15 21:58:51 [crit] 28840#28840: *34 connect() to unix:/run/uwsgi/muzillasite.sock failed (2: No such file or directory) while