Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 4122fb51c176aabb0ac1ab1b7ee327ce > files > 1

netdisco-1.0-2mdv2010.0.noarch.rpm

# MASON Configuration for netdisco 
#   This file applied to the global server space.
# $Id: netdisco_apache.conf,v 1.15 2009/06/02 23:27:02 maxbaker Exp $

#
# Apache 1.x Users -- Comment out these four lines
#
#LoadModule perl_module  libexec/apache2/mod_perl.so
#LoadModule apreq_module libexec/apache2/mod_apreq2.so
PerlModule Apache2::compat
PerlModule Apache2::Request

# Pool Database Connections
PerlModule Apache::DBI

# load the Apache2::compat module
PerlModule Apache2::compat

<Directory /var/www/netdisco/html>
	order allow,deny
	allow from all
</Directory>

<Perl>
# Preload the netdisco module into global server space.
#   and parse the config file only once.
{ package HTML::Mason::Commands;
    use lib '/var/www/netdisco';
    use netdisco qw/:all/;
    &netdisco::config('/etc/netdisco.conf');
}

# Setup Mason and Session Handler
{ package netdisco::Mason; 
    use HTML::Mason;
    use HTML::Mason::ApacheHandler;
    use strict;

    my $ah = new HTML::Mason::ApacheHandler(
        args_method            => 'mod_perl',
        comp_root              => '/var/www/netdisco/html',
        data_dir               => '/var/www/netdisco/mason',
        request_class          => 'MasonX::Request::WithApacheSession',
        session_class          => 'Apache::Session::Postgres',
        session_commit         => 1,
        session_use_cookie     => 1,
        session_cookie_expires => '+1y',
        session_cookie_name    => 'netdisco',
#!! Change the following lines to match your Database Configuration.
        session_data_source    => 'dbi:Pg:dbname=netdisco',
        session_user_name      => 'netdisco',
        session_password       => 'PASSWORDHERE',
                                           );
    sub handler {
        my $request = shift;
        return $ah->handle_request($request);
    }
}
</Perl>