web共有のapacheでCGI,ruby,phpを使用可能にする

rootでhttpd.confを編集する。

$ su root
# vi /etc/httpd/httpd.conf

以下の行をコメントアウトする。

#LoadModule perl_module        libexec/httpd/libperl.so
#LoadModule php4_module        libexec/httpd/libphp4.so
#AddModule mod_perl.c
#AddModule mod_php4.c

以下のディレクティブの"Options None"を"Options ExecCGI"に変更する。


    AllowOverride None
#  Options None
    Options ExecCGI
    Order allow,deny
    Allow from all

"DirectoryIndex"を変更する。

DirectoryIndex index.html index.php index.rb

"#AddHandler cgi-script .cgi" のあたりに下記を追加

AddType application/x-httpd-php .php
AddHandler cgi-script .cgi .rb

web共有を「停止」「開始」ボタンで再起動する。