我使用apache webserver和mod_python作爲我的接口。我正在從mod_python移動到mod_wsgi。我已經完成了所有的設置,一切工作正常。現在,當我添加以下行(啓用守護進程模式)時,該網站無法正常工作。apache 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。然後重新測試,看看是否仍然存在。這樣你縮小了原因。 –