##
## kwiki-apache.conf -- Apache Configuration for Kwiki
##
# convenience URL redirection
RedirectMatch ^/kwiki$ /kwiki/
# run-time URL aliasing
Alias /kwiki/ @l_prefix@/var/kwiki/
# run-time directory configuration
# access control
Order allow,deny
Allow from all
# local server configuration
AllowOverride All
Options ExecCGI
DirectoryIndex index.cgi
# run-time engine selection
# use accelerating mod_perl
SetHandler perl-script
PerlHandler Apache::Registry
# use standardized mod_cgi
AddHandler cgi-script .cgi
# access control
Require user admin
AuthType Basic
AuthName Restricted
AuthUserFile @l_prefix@/var/kwiki/admin/passwd
Order allow,deny
Deny from all
Satisfy All
# local server configuration
Options +FollowSymLinks
# access control
Allow from all
# optional mod_perl setup
# support optional lib/ subdir similar to index.cgi
use lib "@l_prefix@/var/kwiki/lib";
# pre-load all Kiwki plugins
use CGI;
use Spoon;
use Spiffy;
use Kwiki;
use IO::File;
my $io = new IO::File "<@l_prefix@/var/kwiki/plugins" or die;
my $run = ''; $run .= $_ while (<$io>);
$io->close();
$run =~ s|^(Kwiki::.+)$|use $1;|mg;
eval "$run";