Manual Pages for UNIX Darwin command on man Apache::PerlSections
MyWebUniversity

Manual Pages for UNIX Darwin command on man Apache::PerlSections

Apache::PerlSections(3)User Contributed Perl DocumentatioAnpache::PerlSections(3)

NAME

Apache::PerlSections - Utilities for work with sections

SYNOPSIS

use Apache::PerlSections ();

DESCRIPTION

It is possible to configure you server entirely in Perl using sections in httpd.conf. This module is here to help you with such a task. MMEETTHHOODDSS dump This method will dump out all the configuration variables modperl

will be feeding the the apache config gears. The output is suit-

able to read back in via "eval". Example:

use Apache::PerlSections ();

$Port = 8529;

$Location{"/perl"} = {

SetHandler => "perl-script",

PerlHandler => "Apache::Registry", Options => "ExecCGI", }; @DocumentIndex = qw(index.htm index.html);

$VirtualHost{"www.foo.com"} = {

DocumentRoot => "/tmp/docs", ErrorLog => "/dev/null", Location => { "/" => { Allowoverride => 'All', Order => 'deny,allow', Deny => 'from all', Allow => 'from foo.com', }, }, };

print Apache::PerlSections->dump;

This will print something like so: package Apache::ReadConfig;

#scalars:

$Port = 8529;

#arrays:

@DocumentIndex = ( 'index.htm', 'index.html' );

#hashes:

%Location = (

'/perl' => { PerlHandler => 'Apache::Registry',

SetHandler => 'perl-script',

Options => 'ExecCGI' } );

%VirtualHost = (

'www.foo.com' => { Location => { '/' => { Deny => 'from all', Order => 'deny,allow', Allow => 'from foo.com', Allowoverride => 'All' } }, DocumentRoot => '/tmp/docs', ErrorLog => '/dev/null' } ); 1; END store This method will call the "dump" method, writing the output to a file, suitable to be pulled in via "require". Example:

Apache::PerlSections->store("httpdconfig.pl");

require 'httpdconfig.pl';

SEE ALSO

modperl(1), Data::Dumper(3), Devel::Symdump(3) AUTHOR Doug MacEachern

perl v5.8.6 2000-03-30 Apache::PerlSections(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™