apache认证访问
时间:2008-04-01 来源:clyet
     在httpd.conf写入
vi httpd.conf
<Directory "/data/www/mrtg">
AuthType Basic #注意一点,Basic认证方法并不加密来自用户浏览器的密码
AuthName "mrtg access"
AuthUserFile /data/apache2/passwd/htpasswd #密码文件,也就是htpasswd建立的文件
Options Indexes FollowSymLinks
AllowOverride AuthConfig
Order allow,deny
Allow from all
Require valid-user
</Directory>
执行命令建立密码文件
htpasswd -c /data/apache2/passwd/htpasswd username
重新启动apache即可
  vi httpd.conf
<Directory "/data/www/mrtg">
AuthType Basic #注意一点,Basic认证方法并不加密来自用户浏览器的密码
AuthName "mrtg access"
AuthUserFile /data/apache2/passwd/htpasswd #密码文件,也就是htpasswd建立的文件
Options Indexes FollowSymLinks
AllowOverride AuthConfig
Order allow,deny
Allow from all
Require valid-user
</Directory>
执行命令建立密码文件
htpasswd -c /data/apache2/passwd/htpasswd username
重新启动apache即可
 相关阅读 更多 + 
    
  









