From fa3bff5b76161e1573a47623d0737a8e3a5d0dd9 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Thu, 29 May 2008 16:58:32 +0000 Subject: [PATCH] improve lighttpd configuration samples Use the merge (+=) syntax so the user doesn't have to integrate any existing options, and can simply add the snippet as is (even as a seperate include, especially easy in a Debian setup). Extend backend configuration examples with options for a directory index of index.plp, and (static) source rejection. --- lib/PLP.pm | 14 +++++--------- lib/PLP/Backend/CGI.pm | 10 +++++----- lib/PLP/Backend/FastCGI.pm | 18 +++++++++--------- 3 files changed, 19 insertions(+), 23 deletions(-) diff --git a/lib/PLP.pm b/lib/PLP.pm index acf3871..e3fe961 100644 --- a/lib/PLP.pm +++ b/lib/PLP.pm @@ -260,15 +260,11 @@ PLP - Perl in HTML pages F configuration using L: - server.modules = ( - "mod_fastcgi", - ) - fastcgi.server = ( - ".plp" => (( - "bin-path" => "/usr/bin/perl -MPLP::Backend::FastCGI", - "socket" => "/tmp/fcgi-plp.socket", - )), - ) + server.modules += ("mod_fastcgi") + fastcgi.server += (".plp" => (( + "bin-path" => "/usr/bin/perl -MPLP::Backend::FastCGI", + "socket" => "/tmp/fcgi-plp.socket", + ))) =head2 Apache installation diff --git a/lib/PLP/Backend/CGI.pm b/lib/PLP/Backend/CGI.pm index 0005762..1e8def9 100644 --- a/lib/PLP/Backend/CGI.pm +++ b/lib/PLP/Backend/CGI.pm @@ -93,12 +93,12 @@ Or install the C included with PLP. =head2 Lighttpd -Usually in F: -enable I (add/outcomment in server.modules), and add: +Add this to your configuration file (usually F): - cgi.assign = ( - ".plp" => "/foo/bar/plp.cgi", - ) + server.modules += ("mod_cgi") + cgi.assign += (".plp" => "/foo/bar/plp.cgi") + server.indexfiles += ("index.plp") + static-file.exclude-extensions += (".plp") =head2 Apache diff --git a/lib/PLP/Backend/FastCGI.pm b/lib/PLP/Backend/FastCGI.pm index b3c8c3a..4f14863 100644 --- a/lib/PLP/Backend/FastCGI.pm +++ b/lib/PLP/Backend/FastCGI.pm @@ -33,15 +33,15 @@ PLP::Backend::FastCGI - FastCGI interface for PLP =head2 Lighttpd -Edit the configuration file (usually F) -to enable I (add/outcomment in server.modules), and add: - - fastcgi.server = ( - ".plp" => (( - "bin-path" => "/usr/bin/perl -MPLP::Backend::FastCGI", - "socket" => "/tmp/fcgi-plp.socket", - )), - ) +Add this to your configuration file (usually F): + + 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") =head2 Apache -- 2.30.0