Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've recently installed mod_fastcgi and Apache 2.2. I have a simple cgi script as below (test.fcgi):

#!/bin/sh
echo sadjad

But when I invoke 'mysite.com/test.fcgi' I see "Internal Server Error" after a short period of time.

The error.log file shows this error message:

[Tue Jan 31 22:23:57 2006] [warn] FastCGI: (dynamic) server "~/public_html/oaduluth/dispatch.fcgi" has failed to remain running for 30 seconds given 3 attempts, its restart interval has been backed off to 600 seconds

This is my .htaccess file:

AddHandler fastcgi-script .fcgi
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ django.fcgi/$1 [QSA,L]

What could the problem be? Is it my .htaccess file?

share|improve this question

2 Answers 2

You're trying to run a CGI script through the FastCGI interface. That won't work. You can only run a FastCGI script, that follows the FastCGI specification, using the FastCGI interface. The server keeps running your script and trying to send it FastCGI requests and it keeps terminating without ever having received or processed any requests.

share|improve this answer

The problem is in your script. You must accept request before you print something to browser.

See the similar question on stackoverflow.com.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.