Итак, я получаю сообщение об ошибке, потому что мой файл .sock не создается uwsgi. Я также использую VB с vagrant.
мой uwsgi.ini
[uwsgi]
master = true
pidfile = /tmp/uwsgi-%n.pid
workers = 12
enable-threads = true
uid = www-data
gid = www-data
socket = /tmp/uwsgi-my-site.sock
chmod-socket = 777
virtualenv = /var/sites/%n/env
single-interpreter = true
chdir = /var/sites/%n
wsgi-file = app/main.py
logto = /vagrant/my-site/log/uwsgi.log
#stats = 127.0.0.1:1717
и мой nginx.conf
server {
listen 80;
server_name my-site.com;
access_log /var/sites/my-site/log/nginx_access.log;
error_log /var/sites/my-site/log/nginx_error.log;
root /var/sites/my-site/app;
location / {
uwsgi_pass unix:///tmp/uwsgi-my-site.sock;
include /etc/nginx/uwsgi_params;
}
location /static {
alias /var/sites/my-site/app/static;
expires 24h;
}
# Strip trailing slashes.
rewrite ^/(.*)/$ /$1 permanent;
}
И моя ошибка nginx
2014/05/16 23:22:27 [crit] 3914#0: *1 connect() to unix:///tmp/uwsgi-foo.sock failed (2: No such file or directory) while connecting to upstream, client: 10.0.2.2, server: foo.com, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///tmp/uwsgi-foo.sock:", host: "127.0.0.1:8080"
мой uwsgi.log тоже не пишется.