UWSGI 没有创建我的套接字

UWSGI 没有创建我的套接字

因此,我收到错误,因为我的 .sock 文件不是由 uwsgi 创建的。我还在用 vagrant 运行 VB。

我的 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 甚至没有被写入。

相关内容