end0tknr's kipple - 新web写経開発

http://d.hatena.ne.jp/end0tknr/ から移転しました

apache 2.2.19にDSOでmod_perl-2.0.5を組み込んでみた


以前も同様のエントリを記載していますが、apache 2.2.19 + mod_perl-2.0.5 の組み合わせでは、なぜか静的moduleとしてinstallできません。(error msg等は面倒なので書きません)



$ cd httpd-2.2.19
$ ./configure --prefix=/home/endo/local/apache22 \
              --with-mpm=prefork \
              --enable-proxy \
$ make
$ make install


$ cd mod_perl-2.0.5
$ /usr/local/bin/perl Makefile.PL \
          USE_APXS=1 \
          WITH_APXS=/home/endo/local/apache22/bin/apxs \
Next we need to know where the 'apxs' script is located. This script
provides a lot of information about the Apache installation, and makes
it easier to find things on your system. Normally it's located in the
same directory as the 'httpd' executable.

If you don't yet have Apache installed you can build Apache against
the Apache source code, but you won't be able to run the test suite (a
very important step). Therefore you may want to install Apache before

Please provide a full path to 'apxs' executable
(press Enter if you don't have it installed):  ★なぜapxsのpathを聞くの?

$ make
$ make test
# make install

httpd.conf 抜粋

LoadModule perl_module modules/mod_perl.so

PerlModule Apache2::Reload
PerlInitHandler Apache2::Reload
PerlSetVar ReloadDebug Off

#PerlRequire "/home/endo/local/apache22/conf/startup.pl"

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

<Directory /home/endo/dev/pri>
AuthType ApacheSSO
AuthName member
PerlAuthenHandler ApacheSSO->authen
PerlAuthzHandler  ApacheSSO->authz
require valid-user

<Files "*.pl">
Options ExecCGI
AddHandler cgi-script .pl
SetHandler perl-script
PerlHandler ModPerl::Registry
PerlSendHeader On
Alias /pri      /home/endo/dev/pri

<Location /login_form>
AuthType ApacheSSO
AuthName member
SetHandler perl-script
PerlHandler ApacheSSO->login_form

<Location /login>
AuthType ApacheSSO
AuthName member
SetHandler perl-script
PerlHandler ApacheSSO->login

<Location /logout>
AuthType ApacheSSO
AuthName member
SetHandler perl-script
PerlHandler ApacheSSO->logout