【发布时间】:2012-10-12 06:41:23
【问题描述】:
我使用 apache webserver 和 mod_python 作为我的界面。我正在从 mod_python 迁移到 mod_wsgi。我已经完成了所有设置,一切正常。现在,当我添加以下行(以启用守护程序模式)时,该站点无法正常工作。
WSGIDaemonProcess test.tessite.com processes=5 threads=10 display-name=%{GROUP}
我收到来自服务器的 500 错误响应。当我查看 Apache 的错误日志时,我有以下情况,
[Mon Oct 22 12:31:07 2012] [error] [client 58.68.24.230] Premature end of script headers: ls.wsgi
这是我在 conf 中设置的 WSGI,
#Set the number of process and threads for each process. process*thread number of requests can be handled at a time
WSGIDaemonProcess test.testsite.com processes=5 threads=10 display-name=%{GROUP}
#Sets which process group WSGI application is assigned to.
WSGIProcessGroup test.testsite.com
#Maps a URL to a filesystem location and designates the target as a WSGI script.
WSGIScriptAlias / /public/gdp/trunk/src/ukl/lis/process/ls.wsgi
<Directory /public/gdp/trunk/src/ukl/lis/process/>
Order allow,deny
Allow from all
</Directory>
为什么这只发生在守护进程模式下?如何解决这个问题?在非守护模式下运行是否安全?
【问题讨论】:
-
你要做的第一件事是确定它是否与mod_python发生冲突。注释掉和 mod_python 指令并禁用 mod_python 的加载。然后重新测试,看看是否仍然出现。这样你就可以缩小原因。
标签: python django apache mod-wsgi