The problem is my .pl script is downloaded as a blank file instead of being executed.
I read: http://redmine.lighttpd.net/wiki/lighttpd/ApplicationsUsingLighttpd
My dispatch.fcgi is the following: (it is located in usr/bin/
#!perl
#!/usr/bin/perl
use strict;
use CGI::Fast;
use Embed::Persistent; {
my $p = Embed::Persistent->new();
while (new CGI::Fast) {
my $filename = $ENV{SCRIPT_FILENAME};
my $package = $p->valid_package_name($filename);
my $mtime;
if ($p->cached($filename, $package, \$mtime)) {
eval {$package->handler;};
}
else {
$p->eval_file($ENV{SCRIPT_FILENAME});
}
}
}
This is my code in my lighttpd config file:
".pl" =>
((
"fastcgi.debug" => 1,
"bin-path" => "/usr/bin/dispatch.fcgi",
"socket" => "/tmp/fcgi.socket",
"check-local" => "disable",
"min-procs" => 1,
"max-procs" => 5,
"idle-timeout" => 20
))
I had to install CGI.pm and the cpan module embed. Now I do not get any errors in my server log, but as I said, the script just downloads.
Thanks for any help!