|
Calcium Documentation - Apache & mod_perl
Apache Web Server, mod_perl, and Apache::Registry
mod_perl is a module you can plug into your Apache web server
that can, among other things, make Perl CGI scripts run faster. For
details, check out the Apache mod_perl
web pages.
Calcium is compatible with mod_perl's Apache::Registry module.
Configuring your web server to use Apache::Registry can make large Perl
CGI scripts run much faster, particularly on slower machines.
Here are brief instructions for configuring your server to use
Apache::Registry. Note that you will need to use a special version
of Apache that includes mod_perl. Also, your configuration will
likely look differently, these are general guidelines. Please see
the many
mod_perl docs at Apache for more
details.
Add something like this to your Apache configuration file (usually
httpd.conf):
mod_perl 1
Alias /perl/ "/usr/local/apache/cgi-bin/"
SetHandler perl-script
PerlHandler Apache::Registry
Options +ExecCGI
mod_perl 2
Alias /perl/ "/usr/local/apache/cgi-bin/"
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
Options +ExecCGI
You'll also need to add some startup code to your Apache
Perl setup, so it can find the Calcium files. Add something like this
line to your Apache configuration file:
mod_perl 1
PerlRequire /usr/local/apache/conf/startup.pl
mod_perl 2
PerlPostConfigRequire /usr/local/apache/conf/startup.pl
And finally, this is what's needed in the specified file (startup.pl):
use CGI qw(-compile :all);
use lib '/usr/local/CalciumDir40';
use lib '/usr/local/CalciumDir40/redist';
use lib '/usr/local/CalciumDir40/upgrades';
1;
Substitute the correct path to your Calcium support files if you
don't have them installed in /usr/local/CalciumDir40
Remember to restart your web server after you change anything.
Finally, browse to Calcium using the 'perl' path, e.g.
http://your.host/perl/Calcium instead of
cgi-bin.
|