Click to See Complete Forum and Search --> : RH 7.1 exec cgi-scripts


digitized
09-11-2001, 06:36 AM
Hello folks,
I'm running into to problems getting my apache to execute cgi-scripts.I'm starting off using this small script listed below. I put the script in the /var/www/cgi-bin directory.

#!/usr/bin/perl
#
print "Content-type: text/html\n\n";
print "Hello World\n";

I have done a 'chmod +x /var/www/cgi-bin/test.cgi' to test it

I ran >perl -c test.cgi
syntax fine
Then >perl - w test.cgi
Hello World

I keep getting internal error 505

Trying to run http://www.mydomain.com/cgi-bin/first.cgi
Do I need to change my vhost container or add something else to my httpd file?

//some sections from httpd file

#
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

#
<Directory "/var/www/cgi-bin">
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>

AddHandler cgi-script .cgi

# If the perl module is installed, this will be enabled.
<IfModule mod_perl.c>
Alias /perl/ /var/www/perl/
<Location /perl>
SetHandler perl-script
PerlHandler Apache::Registry
Options +ExecCGI
</Location>
</IfModule>

# Virtual host mydomain.com
<VirtualHost x.x.x.x>
DocumentRoot /home/mydomain/www/
ServerName www.mydomain.com (http://www.mydomain.com)
ServerSignature email
</VirtualHost>

Any suggestions? thanks

optimised
09-12-2001, 03:26 PM
Maybe try adding ScriptAlias to you VirtualHost container.

ScriptAlias /cgi-bin/ "/Path/todomain/cgi-bin/"

I believe your problem is in your httpd file. I have not upgraded to 7.1 so I am not sure of any possible changes to apache.

My 6.0 version seemed to run right out of the box as far as I recall.