Apache2.x 【新鯖入荷しました】

このエントリーをはてなブックマークに追加
580nobodyさん
すいません。mod_perl2とapache2でサイト構築してるんですが、
以下のことを実現したく設定していますがうまくいきません。
識者の方お助けを。
■やりたいこと
/cgi-bin/XXX/でアクセスされたときに、DirectoryIndexでindex.cgiに振りたい。
index.cgiはmod_perl2で動作させたい。

■設定1
DirectoryIndex index.cgi #ファイル指定なしはindex.cgiへ
Alias /cgi-bin/XXX/ "/home/aaa/cgi-bin/"
<DirectoryMatch "/home/aaa/cgi-bin/(.*.cgi)">
  SetHandler perl-script
  PerlResponseHandler ModPerl::Registry
  PerlOptions +ParseHeaders
  Options ExecCGI +MultiViews
</DirectoryMatch>
■動作1
http://localhost/cgi-bin/XXX/でアクセス
ブラウザ:
403(forbidden)
エラーログ:
Options ExecCGI is off in this directory: /home/aaa/cgi-bin/index.cgi

つづく
581580:2007/12/06(木) 23:20:21 ID:Hw5oiRQ3
つづき
--
■設定2
<Directory "/home/aaa/cgi-bin/"> <<Directoryに変更
・・中略・・
</Directory>
■動作2
http://localhost/cgi-bin/XXX/でアクセス
ブラウザ:
404(Not Found)
エラーログ:
Attempt to serve directory: /home/aaa/cgi-bin/
--
■設定3
設定1に以下のディレクティブを追記
<Directory "/home/aaa/cgi-bin/">
  Options MultiViews FollowSymLinks ExecCGI
  AllowOverride None
  Order allow,deny
  Allow from All
</Directory>
■動作3
http://localhost/cgi-bin/XXX/でアクセス
ブラウザ:
200 ただし、cgiモードとしての動作。
mod_perl2経由での動作ではない。

DirectoryIndexで指定したCGIをmod_perl2で動作させるにはどうしたらいいんでしょう?
#/XXX/index.cgiで指定した場合は設定1でmod_perl2で動作しています。