Adding perl-cgi in apache 2.4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I need to enable perl-cgi for a specific directory local to a single site. 

I uncommented cgi in http.conf

LoadModule cgid_module libexec/apache24/mod_cgid.so

In the conf for the site in question I have the following:

   <directory "/usr/local/www/bi">
     AllowOverride All
     Require all granted
   </Directory>
   <Directory "/usr/local/www/bi/cgi-local">
      AllowOverride None
      Options +ExecCGI 
      AddHandler cgi-script .pl .cgi
      Order allow,deny
      allow from all
   </Directory>

When I try to go to the file at /usr/local/www/bi/cgi-local/b4.pl I get 

> Internal Server Error
> 
> The server encountered an internal error or misconfiguration and was unable to complete your request.
> 
> Please contact the server administrator at admin@xxxxxxxxxx to inform them of the time this error occurred, and the actions you performed just before this error.
> 
> More information about this error may be available in the server error log.

in the http-error.log there is only:

[cgid:error] [pid 25120] (2)No such file or directory: AH01241: exec of '/usr/local/www/bi/cgi-local/b4.pl' failed
[Tue Jun 18 21:54:59.858842 2019] [cgid:error] [pid 24551] [client x.x.x.x:58890] End of script output before headers: b4.pl, referer: <the site>

However, the script itself hasn’t been modified in 15 years, so I don’t think the script itself is the problem and if I run it from the command line it outputs a regular html file (without the content since the flags that are normally passed on the URL are not present.

# perl cgi-local/b4.pl                                                                                                                                                          Content-type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd";>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<!-- no Filename Set --><!-- no Title Set --><!-- no Column Set -->

…

</html>


-- 
Lead me not into temptation, I can find the way.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx





[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux