8.2. Configuration

First, make a directory for mod_perl programs. This directory can be anywhere, except that it’s a bad idea to put it in the Apache document tree starting with /var/www/html for the same reasons that it is a bad idea to do so for CGI programs. Let’s choose /var/www/mod_perl. Create the directory with the appropriate permissions:

# mkdir /var/www/mod_perl 
# chmod a+rx /var/www/mod_perl
					

Apache needs to be configured appropriately to use mod_perl effectively. We start by creating a Perl script that Apache runs each time it starts up (or more precisely, each time the Apache configuration file is reread). Name this program startup.pl, since it runs when Apache starts up, and put it in the Apache configuration directory /etc/httpd/conf ...

Get Open Source Web Development with LAMP: Using Linux, Apache, MySQL, Perl, and PHP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.