リポジトリブラウザでPHP,CGIが404

120 views
Skip to first unread message

ken3...@gmail.com

unread,
Feb 11, 2009, 12:30:34 PM2/11/09
to Redmine Users (japanese)
はじめまして
ken39argと言います

redmine良いですね。
今までtracを使っていたのですが、redmineに乗り換えました。

さて、redmineをApache+Passengerで動作させたのですが、どうしても.phpと.cgiのファイルのみリポジトリブラウザで
404となってしまいます。
apacheでphpと認識されてしまっているからということは想像できるのですが、どうしても解決できません。
その他は軽快に動作しております。

解決策をご存知の方がいましたら、教えていただけませんでしょうか?

当方apacheの知識はありますが、ruby及びpassengerは初心者です。

サーバーは複数のバーチャルホストを設定しており、httpd.confは下記のように設定いたしました。

httpd.conf
- -
LoadModule passenger_module /usr/lib64/ruby/gems/1.8/gems/
passenger-2.0.6/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib64/ruby/gems/1.8/gems/passenger-2.0.6
PassengerRuby /usr/bin/ruby
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /path/to/redmine/public
ServerName hoge.jp
RailsBaseURI /
<Directory /path/to/redmine/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
php_flag engine off
<Files ~ "^.(htaccess|htpasswd)$">
deny from all
</Files>
AuthUserFile /path/to/redmine/.htpasswd
AuthGroupFile /dev/null
AuthName "Please enter project ID and password"
AuthType Basic
require valid-user
</Directory>
ErrorLog logs/hoge-error_log
CustomLog logs/hoge-access_log common
</VirtualHost>

よろしくお願いします。

前田剛

unread,
Feb 11, 2009, 9:21:14 PM2/11/09
to Redmine Users (japanese)
 前田@ファーエンドテクノロジーです。

On 2月12日, 午前2:30, "ken39...@gmail.com" <ken39...@gmail.com> wrote:
> さて、redmineをApache+Passengerで動作させたのですが、どうしても.phpと.cgiのファイルのみリポジトリブラウザで
> 404となってしまいます。
> apacheでphpと認識されてしまっているからということは想像できるのですが、どうしても解決できません。
> その他は軽快に動作しております。
>
> 解決策をご存知の方がいましたら、教えていただけませんでしょうか?


 <VirtualHost>~</VirtualHost>内に以下の2行を追加すれば解決するかと思います。
私の環境ではOKでした。

php_flag engine off
RemoveHandler .cgi


 以下のwebサイトを参考にさせていただきました。

redmineのリポジトリブラウザでphpファイルが404エラーになる (ぱんぴーまっしぐら):
http://blog.cheki.net/archives/1315


ken39arg

unread,
Feb 11, 2009, 9:44:27 PM2/11/09
to redmine-...@googlegroups.com
前田さん
ありがとうございます。

できました!

<Directory>内に書いていた

php_flag engine off

を外に出して、

RemoveHandler .cgi .php
を追加すると動きました。

完璧です


ありがとうございました!


前田剛 さんは書きました:
Reply all
Reply to author
Forward
0 new messages