apache配置cgi

windows下安装了apache2后默认不能那个执行cgi程序

 

我们需要做一下修改

打开httpd.conf文件,确保以下内容

 

 

ScriptAlias /cgi-bin/ "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin/"

 

<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin">
    AllowOverride None
    Options ExecCGI
    Order allow,deny
    Allow from all
</Directory>

 

AddHandler cgi-script .cgi .exe .pl

 

然后把相应的cgi程序拷贝到cgi-bin下,当然如果cgi程序依赖响应的dll,也要一同拷贝上去

 

测试 Http://127.0.0.1/cgi-bin/xxxx.exe?就访问到了cgi

你可能感兴趣的:(apache配置cgi)