プロが教えるわが家の防犯対策術!

win2000のos上で,ApacheでCGIをローカルで試していますが,
下記のようなerrが出ます。


Forbidden
You don't have permission to access /namazu.cgi on this server.
--------------------------------------------------------------------------------Apache/1.3.19 Server at 127.0.0.1 Port 80

logを見ると,下記です。

[Sun Sep 16 17:22:04 2001] [error] [client 127.0.0.1] Options ExecCGI is off in this directory: c:/~nakai/namazu.cgi

このdirの .htaccess は下記です。
AllowOverride Options
Options +ExecCGI

一方,Apache の httpd.conf 

#ScriptAlias /cgi-bin/ "C:/Program Files/Apache Group/Apache/cgi-bin/"
ScriptAlias /cgi-bin/ "C:/~nakai/cgi-bin/"

#
# "C:/Program Files/Apache Group/Apache/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
#<Directory "C:/Program Files/Apache Group/Apache/cgi-bin">
<Directory "C:/~nakai/cgi-bin/">
AllowOverride None
Options None
#Options ExecCGI
Order allow,deny
Allow from all
SetHandler cgi-script
</Directory>


どのあたりに問題点かあるのでしょうか?

A 回答 (2件)

Windows系は自信がないのですが・・・。

(^_^;
通常Unix系のサーバーではcgiファイルそのものに実行権を付与する必要があります。
namazu.cgiのパーミッションを御確認下さい。
それから、

<Directory "C:/~nakai/cgi-bin/">
AllowOverride None
Options None
#Options ExecCGI

ですが、

<Directory "C:/~nakai/cgi-bin/">
AllowOverride None
#Options None
Options ExecCGI

ではありませんか?
    • good
    • 0

私もApache for Win32は自信がないのですが、


httpd.confで
<Directory "C:/~nakai/cgi-bin/">
AllowOverride None
</Directory>
としていると、(少なくともUNIX版では、、、) .htaccessは使えませんよ。

あと、.cgiファイルの拡張子の関連づけはできていますか?
AddHandlerの設定はできていますか?
    • good
    • 0

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!