activeperl5.8+apache2.0.46+mod_perl2.0整合安装(一个晚上的成果)
1.安装activestate perl 5.8
2.安装apache 2.0.46
3.安装mod_perl,可参考http://perl.apache.org/docs/2.0/os/win32/install.html#PPM_Packages
该文提供了一个自动安装脚本mdinstall,可直接连网安装。
4.edit httpd.conf
# 以下两行添加到加载模块处
LoadFile "c:/perl/bin/perl58.dll"
LoadModule perl_module modules/mod_perl.so
# 以下十一行添加在文件最后
PerlRequire "c:/progra~1/apache~1/apache2/conf/extra.pl"
Alias /perl/ "d:/wwwroot/perl/"
PerlModule ModPerl::Registry
<Location /perl>
SetHandler perl-script
PerlHandler ModPerl::Registry
Options ExecCGI
allow from all
PerlSendHeader On
</Location>
# 以下为文件c:/progra~1/apache~1/apache2/conf/extra.pl的内容
# apache启动时需要加载的模块
# 如果不清楚最好不要改动,(我也不清楚,如果不加载,apache启动就会报错)
use Apache2 ();
use ModPerl::Util ();
use Apache::RequestRec ();
use Apache::RequestIO ();
use Apache::RequestUtil ();
use Apache::Server ();
use Apache::ServerUtil ();
use Apache::Connection ();
use Apache::Log ();
use Apache::Const -compile => ':common';
use APR::Const -compile => ':common';
use APR::Table ();
use Apache::compat ();
use ModPerl::Registry ();
use CGI ();
1;
5.重启apache即可。