免费注册 查看新帖 |

Chinaunix

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

[Web] 问一个apache访问目录的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-10-19 17:17 |只看该作者 |倒序浏览
我的httpd.conf 中,

ServerRoot           "/usr/local/apache"
DocumentRoot     "/usr/local/apache"

在浏览器中输入: http://localhost/,,得到一个正常的目录列表:
Parent Directory        19-Oct-2006 13:39      -  
:                       18-Oct-2006 17:56    32k  
bin/                    19-Oct-2006 05:53      -  
cgi-bin/                16-Oct-2006 15:15      -  
conf/                   19-Oct-2006 16:58      -  
htdocs/                 16-Oct-2006 15:31      -  
icons/                  16-Oct-2006 15:22      -  
include/                16-Oct-2006 15:15      -  
libexec/                16-Oct-2006 15:15      -  
logs/                   19-Oct-2006 08:12      -  
man/                    16-Oct-2006 15:14      -  
proxy/                  16-Oct-2006 15:15      -  

点击均可进入,除了cgi-bin/ 这个目录,每当想进入该路迳时,总是显示403错误:
Forbidden
You don't have permission to access /cgi-bin/ on this serve
错误日志的内容是:

[Thu Oct 19 17:05:43 2006] [error] [client 127.0.0.1] attempt to invoke directory as script: /usr/local/apache/cgi-bin
[Thu Oct 19 17:06:21 2006] [error] [client 127.0.0.1] attempt to invoke directory as script: /usr/local/apache/cgi-bin
[Thu Oct 19 17:14:14 2006] [error] [client 127.0.0.1] attempt to invoke directory as script: /usr/local/apache/cgi-bin





我用ll -d看了这几个目录 ,都是drwxr-xr-x属性,没什么区别啊, 大家谁能告诉我到底为什么cgi-bin/ 如此特殊?

论坛徽章:
0
2 [报告]
发表于 2014-01-06 16:26 |只看该作者
遇到同样问题未解决

http://localhost/cgi-bin/
结果是:
Forbidden
You don't have permission to access /cgi-bin/ on this server.

但是如果输入全路径,可以访问
http://localhost/cgi-bin/index.cgi
结果是:
OK111111111111111111111111111111111111111111

论坛徽章:
3
金牛座
日期:2014-03-27 09:49:51双鱼座
日期:2014-04-02 08:34:15戌狗
日期:2015-01-21 15:39:12
3 [报告]
发表于 2014-01-11 03:07 |只看该作者
看看你的httpd.conf文件配置中,是否目录相关设置有问题
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP