; AuthType “Basic“
AuthUserFile “/var/tmp/xxx.pw“ -----〉把password放在网站外 require valid-user 到apache/bin目录,建password档 % ./htpasswd -c /var/tmp/xxx.pw username1 -----〉第一次建档要用参数“-c“ % /htpasswd /var/tmp/xxx.pw username2 这样就可以保护目录内的内容,进入要用合法的用户。
注:采用了Apache内附的模组。
也可以采用在httpd.conf中加入:
&n页码:[1] [2] [3] [4] [5] [6] 第5页、共6页 |