I'm Running Apache 2.2 on the RackSpace CloudSites. I have a Perl CGI script that works fine if called directly via URL. I want to use the script as a custom ErrorDocument, but instead of being parsed and run it displays the text as plain text.

Here is my .htaccess file:
DirectoryIndex index.php index.html index.htm
Options +ExecCGI
ErrorDocument 404 /cgi/test.cgi

Any help wold be appreciated!

link|improve this question
When the cgi works fine are they inside cgi-bin or outside ? that could be your problem if the cgi is not allowed to run outside of the cgi-bin folder so you would need to put the test.cgi inside it. – Prix Oct 4 '10 at 18:05
Thanks for the replay Prix,The cgi is in a sub-dir of the document root with ExecCGI enabled. So it's outside the cgi-bin but enabled. It runs fine from this location just not if invoked by the .htaccess' ErrorDocument directive. – joatis Oct 5 '10 at 15:46
feedback

1 Answer

up vote 0 down vote accepted

After working with CloudSites support: 1. I had my .htaccess in a directory which won't allow the running of cgi scripts, no matter what options you add. I had to move the .htaccess up one level and refer to a file in a child dir. 2. They said the popular way to do this now is to use PHP instead of CGI.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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