我是Debian挤压官方回购公司安装的Roundup1.4,希望使用mod_wsgi在我的Apache服务器上运行它。主机配置:
<VirtualHost *:80>
ServerName support.domain.com
WSGIScriptAlias / /var/roundup/support/apache/roundup.wsgi
WSGIDaemonProcess support.roundup user=roundup group=roundup threads=25
WSGIProcessGroup support.roundup
<Directory /var/roundup/support>
<Files roundup.wsgi>
Order allow,deny
Allow from all
</Files>
</Directory>
# ... some logging configuration
</VirtualHost>我在/var/roundup/support中使用roundup-admin install安装跟踪器,配置它,然后使用roundup-admin initialise进行初始化。然后我被创建为apache/roundup.wsgi
from roundup.cgi.wsgi_handler import RequestDispatcher
tracker_home = '/var/roundup/support'
application = RequestDispatcher(tracker_home)当在http://support.domain.com打开我的站点时(当然这个url有点不同),我有HTTP 500 Internal Server Error,并使用:
mod_wsgi (pid=17433): Exception occured processing WSGI script '/var/roundup/support/apache/roundup.wsgi'.
RuntimeError: response has not been started到底怎么回事?如何正确地使用wsgi (而不是cgi)运行综合报告?或者去哪里看看为什么没有启动响应呢?
编辑
综合报告的安装手册显示,wsgi处理程序看起来如下所示:
from wsgiref.simple_server import make_server
# obtain the WSGI request dispatcher
from roundup.cgi.wsgi_handler import RequestDispatcher
tracker_home = 'demo'
app = RequestDispatcher(tracker_home)
httpd = make_server('', 8917, app)
httpd.serve_forever()但这没有反应。浏览器永远加载它,没有消息或服务器日志。我认为从apache模块运行的脚本启动另一台服务器不是个好主意。因此,我尝试了另一个代码示例:
from roundup.cgi.wsgi_handler import RequestDispatcher
tracker_home = '/var/roundup/support'
application = RequestDispatcher(tracker_home)
from flup.server.fcgi import WSGIServer
WSGIServer(application).run()但这会引发一些错误,例如:
WSGIServer: missing FastCGI param REQUEST_METHOD required by WSGI!
WSGIServer: missing FastCGI param SERVER_NAME required by WSGI!
WSGIServer: missing FastCGI param SERVER_PORT required by WSGI!
WSGIServer: missing FastCGI param SERVER_PROTOCOL required by WSGI!一定有办法从RequestDispatcher运行我的应用程序..。
发布于 2012-09-17 14:07:24
根据本期的说法,这是一个许可问题。用下列方法解决:
WSGIDaemonProcess support.roundup user=roundup group=roundup threads=25
WSGIProcessGroup support.roundup其中,/var/roundup/support/中的文件具有适当的访问权限,其中roundup作为所有者和组。
发布于 2012-09-16 05:12:25
尝试:
from roundup.cgi.wsgi_handler import RequestDispatcher
tracker_home = '/var/roundup/support'
application = RequestDispatcher(tracker_home)mod_wsgi所需要的是一个“应用程序”对象,它是一个有效的WSGI应用程序入口点。
您不需要自己启动WSGI服务器或FASTCGI适配器,就像您一直试图做的那样。
https://stackoverflow.com/questions/12408871
复制相似问题