The first thing to do is ensure that Apache was built correctly and
that it can serve plain HTML files. This helps to minimize the number
of possible problem areas: once you have confirmed that Apache can
serve plain HTML files, you know that any problems with mod_perl are
related to mod_perl itself.
Apache should be configured just as you would configure it without
mod_perl. Use the defaults as suggested, customizing only when
necessary. Values that will probably need to be customized are
ServerAdmin, DocumentRoot, and
a few others. There are helpful hints preceding each directive in the
configuration files themselves, with further information in
Apache's documentation. Follow the advice in the
files and documentation if in doubt.
If everything works as expected, shut down the server, open
httpd.conf with a text editor, and scroll to the
end of the file. The mod_perl configuration directives are
conventionally added to the end of httpd.conf.
It is possible to place mod_perl's configuration
directives anywhere in httpd.conf, but adding
them at the end seems to work best in practice.
Assuming that all the scripts that should be executed by the
mod_perl-enabled server are located in the
/home/stas/modperl directory, add the following
Alias /perl/ /home/stas/modperl/
Allow from all
Save the modified file.
This configuration causes every URI starting with
/perl to be handled by the Apache mod_perl
module with the handler from the Perl module
|2.2. Installing mod_perl on Unix Platforms||2.4. Installing mod_perl for Windows|