By far the most commonly used part of mod_perl
is the Apache::Registry module. This module creates a simulated CGI
environment that your exiting CGI scripts can use without having to be
rewritten. The first step to setting up Apache::Registry is creating
a directory for CGI scripts that use it. By convention this is a
subdirectory named perl
of the Apache directory, but you may set up multiple directories with different
names in different locations. Become root using su
or sudo, and create
the perl directory
for Apache::Registry to use.
|
Aliasing The Script Directory In httpd.conf
Once you have created a directory for Apache::Registry
to use, you must tell the Apache server about the directory. To do
this, become root using su
or sudo and place the
directory information at the end of the httpd.conf
file. Edit httpd.conf
using your favorite text editor:
|
Move to the bottom of the configuration
file (use Shift-G in vi), and add the following text.
|
Now that mod_perl and Apache::Registry
have been fully configured, you must restart the Apache server to take
advantage of them. The easiest way to do this is to become root and
use the apachectl utility.
|
If all goes well, the server will restart cleanly and you will now have a mod_perl enabled version of Apache running on your system.