2
我無法訪問我的「index.fcgi」;我不斷收到500內部服務器錯誤。 這裏是我的error_log:如何在Fedora 17上使用Python(和Django)的FCGI?
[Thu Aug 09 19:40:17 2012] [warn] [client 127.0.0.1] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Thu Aug 09 19:40:17 2012] [error] [client 127.0.0.1] Premature end of script headers: index.fcgi
下面是我在我的.htaccess文件:
Options +ExecCGI
Options +Indexes
AddHandler fcgid-script .fcgi
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.fcgi/ [QSA,L]
,這裏是我的index.fcgi:
#!/usr/bin/python2.7
from django.core.servers.fastcgi import runfastcgi
runfastcgi(method="threaded", daemonize="false")
print "Content-type: text/html\n\n"
print
print "<html>"
print "<body>"
print "<b>test</b>"
print "</body>"
print "</html>"
我甚至已經刪除了Django的進口和runfastcgi組件,而且我仍然可以看到我的頁面。
這是爲什麼發生在我身上?我已經肯定安裝了mod_python,mod_wsgi的,mod_fcgid,mod_fcgi,但似乎沒有任何可以使它運行...