apache2とmod_perl
perl Makefile.PL MP_APXS=/usr/bin/apxs2
make
make install
httpd.conf
AddHandler cgi-script .cgi .pl
LoadModule perl_module lib/httpd/modules/mod_perl.so
<Files *.pl>
SetHandler perl-script
# PerlHandler ModPerl::PerlRun
PerlResponseHandler ModPerl::Registry
PerlSendHeader On
Options +ExecCGI
</Files>
確認の方法
#!/usr/bin/perl
print "Content-type: text/plain\n\n";
foreach $key (sort keys %ENV) {
print "$key = $ENV{$key}\n";
}
で $ENV{'MOD_PERL'}があればOK
No comments:
Post a Comment