我试图通过13.1 (Apache2.2,Windows7)在本地运行Web 2.2.28+,但是当我在我的站点内打开它或出现以下消息(blast.cgi内容)时,当我直接使用blast.html页面时,它会显示错误403:
#!/bin/csh -f
#
# $Id: blast.cgi,v 1.1 2002/08/06 19:03:51 dondosha Exp $
#
echo "Content-type: text/html"
echo ""
#setenv DEBUG_COMMAND_LINE TRUE
setenv BLASTDB db
./blast.REALApache安装在"C:\Program (x86)\EasyPHP-DevServer-13.1VC9\binaries\apache\bin“”中,并配置为以下内容(httpd.conf):
# Added below to get wwwblast to work
AddHandler cgi-script .cgi
<Directory "C:/Program Files (x86)/EasyPHP-DevServer-13.1VC9/data/localweb/original/cgi-bin/">
AddHandler cgi-script .cgi REAL
Options Indexes
Options FollowSymLinks
Options ExecCGI
Options Indexes
Order allow,deny
Allow from all
</Directory>并且blast.html文件位于"C:\Program blast.html“中
在Apache访问日志中,我发现:
127.0.0.1 - - [08/Oct/2013:19:40:13 -0300] "GET /original/?area=tools HTTP/1.1" 200 1797
127.0.0.1 - - [08/Oct/2013:19:44:27 -0300] "POST /original/cgi-bin/blast.cgi HTTP/1.1" 403 1115在Apache错误日志中:
[Tue Oct 08 19:44:27.607881 2013] [cgi:error] [pid 6084:tid 1036] [client 127.0.0.1:52298] Options ExecCGI is off in this directory: C:/Program Files (x86)/EasyPHP-DevServer-13.1VC9/data/localweb/original/cgi-bin/blast.cgi, referer: http://127.0.0.1/original/cgi-bin/blast.html我真的一点也不懂Apache,但是我是不是在ExecCGI中激活了httpd.conf呢?我很困惑。
我一直在尝试所有我能想象的组合(更改路径、文件名、apache选项序列),但是.没什么。
有人能帮我吗?我非常需要,从2012年起我就一直在努力让它运转起来。
谢谢大家,并对任何语言问题表示歉意。迪米特里厄斯
发布于 2013-10-09 08:09:53
编辑:对不起,我一开始就错过了Windows 7。Afaik,没有windows版本的wwwblast二进制文件。因此,你在这里试图做的是行不通的。你有几种选择:
下面剩下的只是一个小错误。
你似乎错过了“+”字:
Options +ExecCGI不
Options ExecCGI以及Options +Indexes等。apache需要+或- for布尔选项来打开或关闭它们。
此外,这个问题是否更适合服务器错误,因为它是关于服务器配置而不是编程的?
请参阅:http://httpd.apache.org/docs/current/howto/cgi.html
https://stackoverflow.com/questions/19260392
复制相似问题