gbrowse と mod_perl

簡単なベンチの結果では倍くらいは早くなったけど、まじめなベンチを取ってないので実際は不明。。。

gbrowseのインストール先は次の所として、違うときは適当に読みかえる

/home/hoge/public_html/ggb1

apache2.confの設定はこんなかんじかなぁ?

apreq2.soが必要かはよくわからない、、、

apache2.confの設定

LoadModule apreq_module /usr/lib/apache2/modules/mod_apreq2.so
PerlRequire /home/hoge/startup.pl
<Directory /home/hoge/public_html/ggb1/cgi-bin>
<Files ~ "(gbrowse$|a.pl)">
  SetHandler perl-script
  PerlHandler ModPerl::Registry
  Options +ExecCGI
  PerlSendHeader On
  Order allow,deny
  Allow from all
</Files>
</Directory>

startup.pl

#!/usr/bin/perl
use strict;
use warnings;
use lib qw (/home/hoge/public_html/ggb1/lib);

1;

ここまでで、設定はおわるとおもう。たぶん。。。

mod_perlを確認するためのスクリプトをa.plとして、gbrowseと同じ位置におく
a.pl

#!/usr/bin/perl -w
use strict;

print "Content-type: text/plain\n\n";
foreach my $key (keys(%ENV)) {
  print "$key = $ENV{$key}\n";
}

Apache2のStatusを使うという手もある

<Location /perl-status>
  SetHandler perl-script
  PerlHandler Apache2::Status
</Location>