HTTPサーバ
対象バージョン
httpd-2.0.40-21 (Red Hat Linux 9)
httpd-2.0.54-10 (Fedora Core 4)
httpd-2.0.54-10 (Fedora Core 4)
インストール
追加インストールは不要です。
設定
1.任意のディレクトリでのCGI実行
/var/www/cgi-bin/ ディレクトリ以外でのCGI実行を許可する設定を行います。
viエディタでApacheの設定ファイルを開きます。
ファイル( /etc/httpd/conf/httpd.conf )
設定が終わったら、rcスクリプトを使用してHTTPサービスを再起動します。
viエディタでApacheの設定ファイルを開きます。
# vi /etc/httpd/conf/httpd.conf[Enter]
ファイル( /etc/httpd/conf/httpd.conf )
※ファイルの該当箇所に追加※ ※コメント行は省略
<Directory "/var/www/html">
Options Indexes FollowSymLinks ExecCGI ←ExecCGI を追加
AllowOverride None
Order allow,deny
Allow from all
AddHandler cgi-script .cgi .pl ←この行を追加
</Directory>
<Directory "/var/www/html">
Options Indexes FollowSymLinks ExecCGI ←ExecCGI を追加
AllowOverride None
Order allow,deny
Allow from all
AddHandler cgi-script .cgi .pl ←この行を追加
</Directory>
設定が終わったら、rcスクリプトを使用してHTTPサービスを再起動します。
# /etc/rc.d/init.d/httpd△restart[Enter]
