0

在 Ubuntu 12.04 上遇到 uwsgi 和 django 项目的问题。
uwsgi 运行良好,但看不到任何应用程序。

我的项目位于/home/satchitananda/PycharmProjects/dbTest/目录中。

nginx配置:

server {
root /usr/share/nginx/www;
index index.html index.htm;

server_name somehost;


location / {
            uwsgi_pass unix:///var/run/uwsgi/app/projectname/socket;
            include uwsgi_params;
}


location /doc {
    root /usr/share;
    autoindex on;
    allow 127.0.0.1;
    deny all;
}
}

uwsgi 配置:

[uwsgi]
plugins = python27
virtualenv=/home/satchitananda/.env4/
pythonpath = ..
thread=3
master=1
env = DJANGO_SETTINGS_MODULE=dbTest.dbTest.settings
module = django.core.handlers.wsgi:WSGIHandler()
chdir = /home/satchitananda/PycharmProjects/dbTest/
#socket = /var/run/uwsgi/app/projectname/socket
logto = /var/log/uwsgi/projectname.log
touch-reload = /home/satchitananda/PycharmProjects/dbTest/  

uwsgi 日志:

Thu Aug 16 09:29:57 2012 - *** Starting uWSGI 1.0.3-debian (64bit) on [Thu Aug 16 09:29:57 2012] ***
Thu Aug 16 09:29:57 2012 - compiled with version: 4.6.3 on 17 July 2012 02:26:54
Thu Aug 16 09:29:57 2012 - current working directory: /
Thu Aug 16 09:29:57 2012 - writing pidfile to /run/uwsgi/app/projectname/pid
Thu Aug 16 09:29:57 2012 - detected binary path: /usr/bin/uwsgi-core
Thu Aug 16 09:29:57 2012 - setgid() to 33
Thu Aug 16 09:29:57 2012 - setuid() to 33
Thu Aug 16 09:29:57 2012 - your memory page size is 4096 bytes
Thu Aug 16 09:29:57 2012 - uwsgi socket 0 bound to UNIX address /run/uwsgi/app/projectname/socket fd 5
Thu Aug 16 09:29:57 2012 - your server socket listen backlog is limited to 100 connections
Thu Aug 16 09:29:57 2012 - *** Operational MODE: preforking ***
Thu Aug 16 09:29:57 2012 - *** no app loaded. going in full dynamic mode ***
Thu Aug 16 09:29:57 2012 - *** uWSGI is running in multiple interpreter mode ***
Thu Aug 16 09:29:57 2012 - spawned uWSGI master process (pid: 22335)
Thu Aug 16 09:29:57 2012 - spawned uWSGI worker 1 (pid: 22337, cores: 1)
Thu Aug 16 09:29:57 2012 - spawned uWSGI worker 2 (pid: 22339, cores: 1)

如何纠正这个?

4

1 回答 1

0

你用 # 禁用套接字现在它是一个注释

socket = /var/run/uwsgi/app/projectname/socket

我不确定,但默认项目设置看起来dbTest.settings不像dbTest.dbTest.settings

env = DJANGO_SETTINGS_MODULE=dbTest.settings
于 2012-09-18T16:40:21.260 回答