mod_perl
mod_perl brings together the Perl programming language and the Apache HTTP server. It also prevents the need to start an external interpreter and the overhead this method would cause.
Installation
Ubuntu
10.04 Lucid and above
You need a working Perl before you can use mod_perl.
Simply install the following package(s):
libapache2-mod-perl2
(main)
The Apache module should be active by default, but you can use
a2enmod perl
to make sure it is enabled.
You have to define the file types to be handled by Perl. Example to associate .pl
files:
- mod_perl.conf
<IfModule mod_perl.c> <Files *.pl> AddHandler perl-script .pl PerlSendHeader On PerlResponseHandler ModPerl::Registry PerlOptions +ParseHeaders Options +ExecCGI </Files> </IfModule>
You may store the configuration as /etc/apache2/conf.d/mod_perl.conf
, it will be included automatically on Apache's startup when placed there.
Debian
5.0 Lenny and above
See the Ubuntu instructions, it is exactly the same on Debian.