我使用 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>
为什么这只发生在守护进程模式下?如何解决这个问题?在非守护程序模式下运行是否安全?