当前位置: 技术问答>linux和unix
apache服务器无法启用用户身份验证问题
来源: 互联网 发布时间:2017-02-19
本文导语: apache服务器无法启用用户身份验证问题 [root@localhost ~]# cat /etc/httpd/conf/chen.htpasswd chen:dzTh9glNjE.Kc [root@localhost ~]# vi /home/chen/public_html/.htaccess [root@localhost ~]# cat /home/chen/public_html/.htaccess authname "this is a ...
apache服务器无法启用用户身份验证问题
[root@localhost ~]# cat /etc/httpd/conf/chen.htpasswd
chen:dzTh9glNjE.Kc
[root@localhost ~]# vi /home/chen/public_html/.htaccess
[root@localhost ~]# cat /home/chen/public_html/.htaccess
authname "this is a test"
authtype basic
authuserfile /etc/httpd/conf/chen.htpasswd
require user chen
NameVirtualHost 192.168.2.5:80
AllowOverride AuthConfig
ServerAdmin root@sales.com
DirectoryIndex index.html
DocumentRoot /var/www/sales
ServerName www.sales.com
ErrorLog logs/www.sales.com-error_log
CustomLog logs/www.sales..com-access_log common
ServerAdmin root@sample.com
DirectoryIndex index.html
DocumentRoot /var/www/sample
ServerName www.sample.com
ErrorLog logs/www.sample.com-error_log
CustomLog logs/www.sample..com-access_log common
我想局部启用用户身份认证,在www.sales.com/index.html上
现在都能访问网页就是不能启用认证,求解答~
[root@localhost ~]# cat /etc/httpd/conf/chen.htpasswd
chen:dzTh9glNjE.Kc
[root@localhost ~]# vi /home/chen/public_html/.htaccess
[root@localhost ~]# cat /home/chen/public_html/.htaccess
authname "this is a test"
authtype basic
authuserfile /etc/httpd/conf/chen.htpasswd
require user chen
NameVirtualHost 192.168.2.5:80
AllowOverride AuthConfig
ServerAdmin root@sales.com
DirectoryIndex index.html
DocumentRoot /var/www/sales
ServerName www.sales.com
ErrorLog logs/www.sales.com-error_log
CustomLog logs/www.sales..com-access_log common
ServerAdmin root@sample.com
DirectoryIndex index.html
DocumentRoot /var/www/sample
ServerName www.sample.com
ErrorLog logs/www.sample.com-error_log
CustomLog logs/www.sample..com-access_log common
我想局部启用用户身份认证,在www.sales.com/index.html上
现在都能访问网页就是不能启用认证,求解答~
|
http://topic.csdn.net/t/20031215/12/2564663.html