#
# "C:/Program Files/Apache Group/Apache/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "E:/Website_Field/cgi">
AllowOverride all
Options all
Order allow,deny
Allow from all
</Directory>
设置Directory为可以执行cgi的目录
2.
寻找:
复制代码 代码如下:
#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ "E:/Website_Field/cgi"
将之后的目录改成和上面的相同。
3.
设置cgi脚本的后缀,寻找:
复制代码 代码如下:
#
# AddHandler allows you to map certain file extensions to "handlers",
# actions unrelated to filetype. These can be either built into the server
# or added with the Action command (see below)
#
# If you want to use server side includes, or CGI outside
# ScriptAliased directories, uncomment the following lines.
#
# To use CGI scripts:
#
AddHandler cgi-script .cgi .pl
#
# To use server-parsed HTML files
#
AddType text/html .shtml
AddHandler server-parsed .shtml
去掉后两行之前的#号;
2)同时需要指定那个在哪个目录内支持这种解析,寻找:
复制代码 代码如下:
#
# "C:/Program Files/Apache Group/Apache/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "E:/Website_Field/shtml">
AllowOverride all
Options all
Order allow,deny
Allow from all
</Directory>