Project

General

Profile

Actions

ApplicationsUsingLighttpd » History » Revision 3

« Previous | Revision 3/34 (diff) | Next »
jan, 2005-06-06 19:45


= Applications Using lighttpd =

Lighttpd works nicely with most web-projects. To get them setup easily some are providing special lighttpd setups.

Using a Perl dispatcher instead of mod_perl

I just received a mail from Alex Shah <>:

{{{
I thought you might like to include this in the distribution:

#!/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});
}
}
}

Here's the lighttpd.conf:

fastcgi.server = ( ".pl" =>
( "localhost" =>
(
"socket" => "/tmp/application.fcgi.socket",
"bin-path" => "/Users/ashah/docroot/dispatch.fcgi",
)
)
)
}}}

Updated by jan over 19 years ago · 34 revisions