ScriptAlias /cgi-bin/ "d:/Apache/cgi-bin/"<Directory "d:/Apache/cgi-bin"> AllowOverride None Options ExecCGI Order allow,deny Allow from all </Directory>
ScriptAlias /cgi-bin/ "d:/Apache/cgi-bin/"<Directory "d:/Apache/cgi-bin"> AllowOverride All Options ExecCGI Order allow,deny Allow from all </Directory>.... AddHandler cgi-script .cgi AddHandler cgi-script .pl
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
hello.c
#include <stdio.h>
main()
{
printf("Content-Type:text/html\n\n");
printf("hello\n");
}
注意:一定要有两个\n的
#!c:/perl/bin/perl.exe
AllowOverride All
Options ExecCGI
Order allow,deny
Allow from all
</Directory>....
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
是cgi程序
Options All
都改为ALL试试看
2、寻找到<Directory "d:/Apache/cgi-bin">。将""中的路径指向你存放CGI脚本的目录,更改Options、Allow Override的参数为All。
#!c:/perl/bin/perl.exe"
还有,我的cgi脚本有问题,现在正常.