zoukankan      html  css  js  c++  java
  • 采用htpasswd设置验证机制

    <IfModule mod_authn_file.c>
            AuthType Basic
            AuthName "Authorization Required"
            AuthUserFile <passwordfile which is create by htpasswd cmd>
            Require valid-user
    </IfModule>

    windows: apache/bin/htpasswd.exe
    Linux: htpasswd

    Usage:
            htpasswd [-cmdpsD] passwordfile username
            htpasswd -b[cmdpsD] passwordfile username password

            htpasswd -n[mdps] username
            htpasswd -nb[mdps] username password
     -c  Create a new file.
     -n  Don’t update file; display results on stdout.
     -m  Force MD5 encryption of the password (default).
     -d  Force CRYPT encryption of the password.
     -p  Do not encrypt the password (plaintext).
     -s  Force SHA encryption of the password.
     -b  Use the password from the command line rather than prompting for it.
     -D  Delete the specified user.
    On other systems than Windows, NetWare and TPF the ‘-p’ flag will probably not work.
    The SHA algorithm does not use a salt and is less secure than the MD5 algorithm.

  • 相关阅读:
    142. 环形链表 II
    59. 螺旋矩阵 II
    996. 正方形数组的数目
    1323. 6 和 9 组成的最大数字
    面试题 17.14. 最小K个数
    389. 找不同
    1103. 分糖果 II
    背景透明度
    css3-新属性-用户界面
    响应式布局-基础结构
  • 原文地址:https://www.cnblogs.com/uniqid/p/5693359.html
Copyright © 2011-2022 走看看