NAME

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

SYNOPSIS

Lighttpd

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")

Apache

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>

DESCRIPTION

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.

Configuration directives

PLP behaviour can be configured by setting environment variables.

PLP_CACHE

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.

AUTHOR

Mischa POSLAWSKY <perl@shiar.org>

SEE ALSO

PLP, PLP::Backend::CGI, FCGI