Your CGI script is called often, and the web server is suffering as a result. You’d like to lessen the load your CGI script causes.
in the Apache web server along with
the following section in your httpd.conf file:
Alias /perl/ /real/path/to/perl/scripts/ <Location /perl> SetHandler perl-script PerlHandler Apache::Registry Options ExecCGI </Location> PerlModule Apache::Registry PerlModule CGI PerlSendHeader On
mod_perl Apache web server module, you
can write Perl code that will step in at any part of a
request’s processing. You can write your own logging and
authentication routines, define virtual hosts and their
configuration, and write your own handlers for certain types of
The snippet above says that requests with URLs starting in
/perl/ are actually in
/real/path/to/perl/scripts/ and that they should
be handled by Apache::Registry. This runs them in a CGI environment.
CGI preloads the CGI
makes most of your CGI scripts work out of the box with
/perl/ works analogously to
/cgi-bin/. To make the suffix
scripts just as the suffix .cgi
indicates regular CGI scripts, use the following in your Apache
<Files *.perl> SetHandler perl-script PerlHandler Apache::Registry Options ExecCGI </Files>
Because the Perl interpreter that runs your CGI script doesn’t shut down when your script is done (as normally ...