HomePage » WebServer » Apache » ApachePerl



Apache mod_perl

Download mod_perl from http://perl.apache.org
Install it by
perl Makefile.PL MP_APXS=/path/to/apxs
make
make test
make install
# Might be necessary
perl -MCPAN -e 'install Apache::Registry'


Apache configuration
mod_perl speeds up CGI programs without needing to change the code.

On Apache1, mod_perl can be enabled by
Alias /cgi-perl/ /usr/local/apache/cgi-bin/
<Location /cgi-perl>
    Options ExecCGI
    SetHandler perl-script
    PerlHandler Apache::PerlRun
    PerlSendHeader On
</Location>

Alias /perl/ /usr/local/apache/cgi-bin/
<Location /perl>
    Options ExecCGI
    SetHandler perl-script
    PerlHandler Apache::Registry
    PerlSendHeader On
</Location>


On Apache2, mod_perl can be enabled by
PerlModule ModPerl::PerlRun
Alias /cgi-perl/ /usr/local/apache2/cgi-bin/
<Location /cgi-perl>
    SetHandler perl-script
    PerlResponseHandler ModPerl::PerlRun
    Options +ExecCGI
</Location>

PerlModule ModPerl::Registry
Alias /perl/ /usr/local/apache2/cgi-bin/
<Location /perl>
    SetHandler perl-script
    PerlResponseHandler ModPerl::Registry
    Options +ExecCGI
</Location>


In registry mode, program code are stored in memory after compilation. More memory is necessary, and higher quality code is necessary to prevent memory leak.

There are no comments on this page. [Add comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki