小风儿 发表于 2018-11-27 09:52:40

apache目录密码认证

如:  ServerAdmin webmaster@m6699.com
  DocumentRoot "/www/wwwroot"
  ServerName www.abc.com
     ————加入这一段
  AuthType Basic
  Allow from all
  AuthName "弹出密码窗口提示的文字"
  AuthUserFile /usr/local/apache/passwd————之前建立的密码文件
  Require valid-user-----允许文件中所有用户都能访问,如果只要求特定用的用户的话就这样写 Require user 用户名
  
  

页: [1]
查看完整版本: apache目录密码认证