
PLP::Backend::FastCGI - FastCGI interface for PLP

Add this to your configuration file (usually /etc/lighttpd/lighttpd.conf):
server.modules += ("mod_fastcgi")
fastcgi.server += (".plp" => ((
"bin-path" => "/usr/bin/perl -MPLP::Backend::FastCGI",
"socket" => "/tmp/fcgi-plp.socket",
)))
server.indexfiles += ("index.plp")
static-file.exclude-extensions += (".plp")
You'll need a dispatch script (plp.fcgi is included with PLP). Example /foo/bar/plp.fcgi:
#!/usr/bin/perl
use PLP::Backend::FastCGI;
Then enable either mod_fcgid (recommended) or mod_fastcgi, and setup httpd.conf (in new installs just create /etc/apache/conf.d/plp) with:
<IfModule mod_fastcgi.c>
AddHandler fastcgi-script plp
FastCgiWrapper /foo/bar/plp.fcgi
</IfModule>
<IfModule mod_fcgid.c>
AddHandler fcgid-script plp
FCGIWrapper /foo/bar/plp.fcgi .plp
</IfModule>

This is usually the preferred backend, providing persistent processes for speeds comparable to mod_perl and reliability closer to CGI.
Servers often feature auto-adjusting number of daemons, script timeouts, and occasional restarts.
PLP behaviour can be configured by setting environment variables.
Sets caching off if false (0 or empty), on otherwise (true or undefined). When caching, PLP saves your script in memory and doesn't re-read and re-parse it if it hasn't changed. PLP will use more memory, but will also run 50% faster.

Mischa POSLAWSKY <perl@shiar.org>
