2012-08-16 81 views
-1

在Ubuntu 12.04上遇到uwsgi和django項目的麻煩。
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) 

如何糾正THI S'

回答

0

你跟#禁用套接字現在它是一個註釋

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

我不知道,但默認項目設置看起來像dbTest.settingsdbTest.dbTest.settings

env = DJANGO_SETTINGS_MODULE=dbTest.settings 
相關問題