My apache server previously used CGI scripts written in perl. I heard that using mod_perl is much faster than using standard cgi scripts, so I went about setting up mod_perl on my server. According to this page, all I needed to do in order for my CGI scripts to run under mod_perl was to edit my httpd.conf file. I added the following lines to the end of my httpd:
LoadModule perl_module libexec/apache2/mod_perl.so
<Location /cgi-bin>
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
Options ExecCGI
PerlSendHeader On
Order allow,deny
Allow from all
</Location>
If I check for
exists $ENV{"MOD_PERL"}in a CGI file, the MOD_PERL variable appears to be present. So I'm pretty sure I have mod_perl set up and running.
My question is: Does my completely unaltered CGI script actually experience a speedup? Is there anything I can do to speed it up even more? Or would any further work not really be worth it for the speedup? Does anyone have experience with this type of stuff?
I've been searching documentation and forums for an answer, but I can't really find anything. Thanks in advance for your help!
SetHandler modperl
. - daxim