improve lighttpd configuration samples
authorMischa POSLAWSKY <perl@shiar.org>
Thu, 29 May 2008 16:58:32 +0000 (16:58 +0000)
committerMischa POSLAWSKY <perl@shiar.org>
Thu, 29 May 2008 16:59:13 +0000 (16:59 +0000)
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
lib/PLP/Backend/CGI.pm
lib/PLP/Backend/FastCGI.pm

index acf38711bf0be81f64f5752cc1c2087d379febf0..e3fe961d4a2ebe37596b86cec841340d1f333e47 100644 (file)
@@ -260,15 +260,11 @@ PLP - Perl in HTML pages
 
 F<lighttpd.conf> configuration using L<mod_fastcgi|PLP::Backend::FastCGI>:
 
-    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
 
index 0005762dd5fe5d66cfedbfb0cc702cc4cfcc7b2b..1e8def9abb09a5a394ceafdac5f99da29fb9fa7d 100644 (file)
@@ -93,12 +93,12 @@ Or install the C<plp.cgi> included with PLP.
 
 =head2 Lighttpd
 
-Usually in F</etc/lighttpd/lighttpd.conf>:
-enable I<mod_cgi> (add/outcomment in server.modules), and add:
+Add this to your configuration file (usually F</etc/lighttpd/lighttpd.conf>):
 
-    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
 
index b3c8c3a3dc84852c9a0b7385f99d9293746429a9..4f14863ee9bcb80b64ba1ae5e17c82b1559c8805 100644 (file)
@@ -33,15 +33,15 @@ PLP::Backend::FastCGI - FastCGI interface for PLP
 
 =head2 Lighttpd
 
-Edit the configuration file (usually F</etc/lighttpd/lighttpd.conf>)
-to enable I<mod_fastcgi> (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</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")
 
 =head2 Apache