The Startup File

Like most UNIX programs, mod_perl requires a small startup file that it reads its initial configuration information from.  This file, named startup.pl, is created in the conf subdirectory of the Apache installation.  Become root using su or sudo, and use your favorite text editor to create the startup.pl file in the Apache conf directory.
 

 
lamonml@hespera> cd /usr/local/apache/conf
lamonml@hespera> sudo vi startup.pl

Below is the contents of a basic startup.pl file.  Place the below text in the file you have created, save the file, then exit your text editor.
 

 
#!/usr/bin/perl

BEGIN{
  use Apache();
  use lib Apache->server_root_relative('lib/perl');
}

use Apache::Registry();
use Apache::Constants();
use CGI qw(-compile :all);
use CGI::Carp();

1;

Calling The Startup File From httpd.conf

Once you have created the startup.pl file, you must instruct the server to call it by placing a few lines at the bottom of the httpd.conf file that Apache reads configuration information from.  To do this, become root using su or sudo and edit the httpd.conf file with your text editor of choice.
 

 
lamonml@hespera> sudo vi httpd.conf

Move to the bottom of the file (use Shift-G in vi), and add the following lines of text:
 

 
PerlRequire conf/startup.pl
PerlFreshRestart On

Save the file, and exit the text editor.