uwsgi nginx web.py interal服务器错误:未find应用程序

在我的nginx网站 – 可用/默认这是我的应用程序的相关部分:

location /app/ { include uwsgi_params; uwsgi_pass unix:///tmp/uwsgi.socket; } 

我在uwsgi / sites-available /文件夹下的app.xml文件:

 <uwsgi> <socket>/tmp/uwsgi.socket</socket> <plugins>python</plugins> <chdir>/web/NetWeaveCustom</chdir> <module>index</module> </uwsgi> 

最后我的/web/NetWeaveCustom/index.py模块如下:

 import web urls = ( '/(.*)','index' ) app = web.application(urls, globals()).wsgifunc() class index: def GET(self,name): return name 

这是我的uwsgi错误日志:

GET / app / =>生成了48个字节。[pid:15963 | app:-1 | req:-1/15] 192.168.1.98(){42 vars in 686 bytes} [Sun Dec 30 18:51:37 2012] 0 msecs(HTTP / 1.1 500)2个头63字节(0核心0开关)[pid:15963 | app:-1 | req:-1/16] 192.168.1.98(){42 vars in 686 bytes} [ Sun 12月30日18:51:54 2012] GET / app / =>在0 msecs中生成48个字节(HTTP / 1.1 500)2个标头,63字节(0核心0上的开关)[pid:15964 | app:-1 | GET / app / =>在0 msecs(HTTP / 1.1 500)中生成48个字节2个头文件在63字节(核心0上的0开关)[pid:15963 | app:-1 | req:-1/18] 192.168.1.98(){42 vars in 686 bytes} [Sun Dec 30 18:51:55 2012] GET / app / =>在0毫秒(HTTP / 1.1 500)中生成48个字节63个字节的2个头(核心0上的0个开关)

当我到我的服务器/应用程序/文件夹时,我得到以下错误:

 uWSGI Error: Python application not found. 

在nginx错误日志中没有报告错误。

奇怪的是,这是工作得很好,直到我决定重新启动uwsgi服务。 只要我做了这个错误发生。

任何有关这里发生了什么问题的build议?

当你定义一个“应用程序”的时候,uWSGIsearch可调用的“应用程序”。

使用

 <module>index:app</module> 

或添加

 <callable>app</callable>