2

I'm having trouble accessing my "index.fcgi"; I keep getting a 500 Internal Server Error. Here's my error_log:

[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

Here's what I have in my .htaccess file:

Options +ExecCGI
Options +Indexes
AddHandler fcgid-script .fcgi
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.fcgi/ [QSA,L]

and here's my 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>"

I have even removed the django import and runfastcgi component, and I'm still inable to see my page.

Why is this happening to me? I have definitely installed mod_python, mod_wsgi, mod_fcgid, mod_fcgi, but nothing seems to be making it run...

1 Answer 1

2

There is a way to solve this problem: cd to the directory where index.fcgi is there and run ./index.fcgi
- This will give you the exact error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.