WAMP自宅サーバーの設置
HPが公開できたとしても
最低 CGI/Perlが使いたいものです。

ActiveStateより、フリーのPerlを
インルトールしました。
 ④CGI/Perl

1.ActiveStateのHPより フリーのPerl (Windows版)のダウンロード

 1-1. LANGUAGESからActivePerlを選択


 1-2. フリーのActivePerlをダウンロードする。


 1-3.詳細は入力せずに、Contineボタンを押す。


 1-4.ActivePerl 5.8.8.819 のWindows版パッケージを選択する。


2.Active Perl のインストール
 ダウンロードした Windows Installer版をダブルクリックしてインストール


3.Active Perlの動作環境設定
 システム環境変数のPathに
 C:\Perl\bin\; が追加されているか確認

 もし無ければ、追加する。


4.DOSプロンプトで
 コマンド perl -v  を入力し、Perlの動作確認


5.CGIの置き場所、Apacheの設定をする。
 Apacheをインストールしたフォルダ内にある httpd.conf を修正する。
   
5-1. ScriptAliasの定義で、CGIを置く場所を指定する。

   DocumentRoot "D:\www"内に cgi-binのフォルダを作成し、この中にCGIを置くようにしました。
#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ "D:/www/cgi-bin/"

Directoryも同じものにする。
#
# "C:/Program Files/Apache Group/Apache2/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "D:/www/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

5-2. CGIを使用できるようにする。
   #でコメントになっているので、 #をハズス。
#
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
AddHandler cgi-script .cgi .pl

AddType application/x-httpd-cgi .cgi
AddType application/x-httpd-cgi .pl


6.簡単なCGIを用意し、ブラウザから動作確認をする。


このページの先頭へ


PHP


CRIMSON Systems Homeへ Copyright (C) CRIMSON Systems