免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1694 | 回复: 5
打印 上一主题 下一主题

[FreeBSD] FreeBSD中apache1.3配置cgi的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-03-15 01:02 |只看该作者 |倒序浏览
普通页面已经可以正常访问
访问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!
请问是什么问题?怎么解决?

论坛徽章:
0
2 [报告]
发表于 2004-03-15 18:49 |只看该作者

FreeBSD中apache1.3配置cgi的问题

没人回应吗?
UP!

论坛徽章:
0
3 [报告]
发表于 2004-03-16 13:25 |只看该作者

FreeBSD中apache1.3配置cgi的问题

把你的权限改一下

论坛徽章:
0
4 [报告]
发表于 2004-03-16 13:42 |只看该作者

FreeBSD中apache1.3配置cgi的问题

可能是权限问题,配置大概看了一下,应该没有问题的

论坛徽章:
0
5 [报告]
发表于 2004-03-16 13:52 |只看该作者

FreeBSD中apache1.3配置cgi的问题

想到过是权限的问题,也改过(除非改错了),但一样
问题出在“Apache/1.3.28 Server at 192.168.1.1 Port 80 ”这一行,我的IP不是192.168.1.1,192.168.1.1只是我的DNS Server而已
我是用带路由的Modem共享上网,安装FreeBSD时没有装DNS

论坛徽章:
0
6 [报告]
发表于 2004-03-16 13:59 |只看该作者

FreeBSD中apache1.3配置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
#############
的意思就是在192.168.1.1 port 80上面,你访问/cgi-bin.aaa.cgi被拒绝,你的ip不是192.168.1.1?那么你先把自己的ip地址搞清楚,然后在httpd.conf里面找192.168.1.1,看能不能找到。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP