码迷,mamicode.com
首页 > Web开发 > 详细

Apache增加Basic Auth

时间:2016-04-10 06:50:37      阅读:196      评论:0      收藏:0      [点我收藏+]

标签:

在.htaccess文件中增加
AuthUserFile /var/www/htpasswd/test.htpasswd
AuthName EnterPassword
AuthType Basic
require valid-user

#htpasswd密码文件生成。Create a password file Filename with username as the initial ID. It will prompt for the password
htpasswd -c Filename username

#Add or modify username2 in the password file Filename
htpasswd Filename username2
http://httpd.apache.org/docs/2.2/en/mod/mod_authn_file.html

Apache增加Basic Auth

标签:

原文地址:http://www.cnblogs.com/dream-bccb/p/5373301.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!