①最初の状況
Apache2の公開するページのパス
C:\Program Files\Apache Group\Apache2\index.html
Apache2でCGIが動作するページのパス
C:\Program Files\Apache Group\Apache2\cgi-bin\CGIプログラムのファイル名
◆CGIは動作しているように見えます。
C:\Program Files\Apache Group\Apache2\index.htmlのindex.htmlは閲覧できます。
②今の問題
Apache2でCGIが動作するページのパスへindex.htmlをおきました。
C:\Program Files\Apache Group\Apache2\cgi-bin\index.html
index.htmlを見ようとすると以下のエラーが表示されます。
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, **@****.co.jp and inform them of the time the error occurred,
and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
--------------------------------------------------------------------------------
Apache/2.0.59 (Win32) PHP/5.2.0 Server at 192.168.1.204 Port 80
設定のどこに問題ありますか?
More information about this error may be available in the server error log.
とありますからエラーログを見てみましょう。
まずindex.htmlの中身が気になりますが、index.htmlはCGIのファイルなのですか?
ApacheでCGIが動作するディレクトリを設定しますが(default: cgi-bin)、そこではCGIのファイル以外は動作しません。
dummy
http://www.rescue.ne.jp/CGI-BBS/server/apache/20010810121205.sht...
つまり、cgi-bin配下は、cgiのソースコードが漏れたりしないように、実行以外はしない事になっているのが原因。
cgi-bin配下にhtmlを配置すること自体がおかしいわけだが、どうしても配置したいのであれば、上記URLの通り、ハンドラを追加する。
ありがとうございます、ログの見方を知りませんでした。