- 论坛徽章:
- 0
|
RHEL4, 系统自带Apache, SELinux已关闭
我想将网站的abc目录设置成为需要输入用户名与密码后才能访问。
配置文件如下(所有配置文件的属性已经设为777,属于apache用户),
配置完成后浏览时会显示需要输入用户和密码窗口,但是输入后也无法进入(还是显示请输入密码)。
请高手指点。
-----------------httpd.conf-----------------------
<Directory "/var/www/html/abc">;
require user abc
AuthUserFile /home/user
AuthType Basic
AuthName "abc"
</Directory>;
-------/home/user--------
abc:KWGk9SqLrFQdA
-------已次输入用户密码后浏览器显示的内容-------
Authorization Required
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.
Apache/2.0.52 (Red Hat) Server at 192.168.1.7 Port 80 |
|