Have problem running .pl perl script in apache
my linux is RH9.0
apache 1.3.29
here is some directives I added to httpd.conf to work with perl script
ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
<Directory "/usr/local/apache/cgi-bin">
AllowOverride None
Options FollowSymLinks +ExecCGI
Order allow,deny
Allow from all
</Directory>
AddHandler cgi-script .pl .cgi
And here is my testing perl script
#!/usr/bin/perl
print "Content-type: text/plain\n\n";
print "perl script run properly!\n";
My question is, if the perl script with a .pl extension, web browser just ask me to save the script. However without a .pl extension or with .cgi extension, the script can run properly.
who knows what's the problem ? Anything wrong on my httpd.conf ?
|