- 论坛徽章:
- 0
|
普通页面已经可以正常访问
访问cgi-bin下的cgi文件出现:
Forbidden
You don't have permission to access /cgi-bin/aaa.cgi on this server.
--------------------------------------------------------------------------------
Apache/1.3.28 Server at 192.168.1.1 Port 80
的提示
我的httpd.conf
# ScriptAlias: This controls which directories contain server scripts.
# 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 clie
nt.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ "/usr/local/www/cgi-bin/"
#
# "/usr/local/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/usr/local/www/cgi-bin">;
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>;
#
# 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 clie
nt.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ "/usr/local/www/cgi-bin/"
#
# "/usr/local/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/usr/local/www/cgi-bin">;
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>;
在cgi-bin文件夹下写了内容如下的aaa.cgi文件
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "Hello World!";
root#perl -w aaa.cgi
结果如下:
root# perl -w aaa.cgi
Content-type: text/html
Hello World!
请问是什么问题?怎么解决? |
|