brain dead tonight - proper apache directive to allow for perl scripts?

TheBear

Verified User
Joined
Apr 16, 2004
Messages
78
Hello,

I am kind of cheating here, this question is not for my DA server right now, but I know I will need to know this for that machine shortly.

I have a perl script that I need to allow for in one of my domains, but I can't recall the properl directive to add to allow for execution of perl scripts from a particular directory. And my apache books are at the office.

This is apache 2 (if that matters, not a DA server).

Thanks in advance. I am feeling pretty stupid tonight!

Dale
 
Hi,

Thanks for the response, I am looking for the apache directive. Basically a line that goes into the httpd.conf file. I think it is something like:

AddHandler cgi-script .pl

Dale
 
I might be looking for the wrong thing here, basically I need to be able to execute a perl script from a particular directory, that is the directive I am looking to add to my apache config file.

Dale
 
Dale,

I see what you mean now. What you need to do is create a .htaccess file in the directory containing the Perl script if it is outside the cgi-bin directory and put this in the file:

Options +ExecCGI
AddHandler cgi-script .cgi .pl
 
This is what I was looking for :)

ScriptAlias /cgi-bin/ /var/www/html/cgi-bin/
 
Back
Top