0

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!

joatis
  • 101
  • 4
  • 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 04 '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 05 '10 at 15:46

1 Answers1

0

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.

joatis
  • 101
  • 4