免费注册 查看新帖 |

Chinaunix

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

[Web] apache设置目录身份验证问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-12-03 02:12 |只看该作者 |倒序浏览
最近想对APACHE服务器设置目录的身份验证,在没设.htaccess的时候能对该目录下的网页进行访问,设置好后也弹出了用户登陆窗口,可输入用户名和密码后就是访问不了页面,大家帮忙看下
这个是 .htaccess的内容
AuthUserFile /apachepasswd/passwd
AuthGroupFile /dev/null/
AuthName "My secret directory"
AuthType Basic
Require valid-user

在根目录下也创建了apachepasswd的文件夹,有htpasswd创建了用户,设置成明文,所以输密码用户的时候绝对是没错的
   
[root@localhost acltest]# cat /apachepasswd/passwd
web:1

以下是httpd.conf文件改的内容
Alias /acltest "/acltest/"

<Directory "/acltest">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>
这个是错误日志
[Wed Dec 03 01:43:17 2008] [error] [client 192.168.16.1] (13)!!!!!!!!: Could not open password file: /apachepasswd/passwd
[Wed Dec 03 01:43:17 2008] [error] [client 192.168.16.1] user web not found: /acltest
[Wed Dec 03 01:50:31 2008] [error] [client 192.168.16.1] user web: authentication failure for "/acltest": Password Mismatch
[Wed Dec 03 01:50:33 2008] [error] [client 192.168.16.1] user web: authentication failure for "/acltest": Password Mismatch
这个是访问时的提示
This server could not verify that you are authorized to access the URL "/acltest". You either supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.

[ 本帖最后由 fqflair 于 2008-12-3 02:26 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP