apache2 mysql身份验证模块和SHA1加密

apache2 mysql身份验证模块和SHA1加密

我发现我需要使用 mysql 启用一些身份验证方法。

我已经有一个用户方案。该用户方案与 MD5 密码和 CRYPT 配合使用效果很好,但当我转到 SHA1sum 时,它显示:

[Fri Oct 26 00:03:20 2012] [error] Unsupported encryption type:
Sha1sum

日志文件中没有有用的调试信息。

这是我的设置和一些信息:

Debian6的

apache 和 ssl 安装的软件包:

root@sistemichiocciola:/etc/apache2/mods-available# dpkg --list | grep apache 
ii  apache2                            2.2.16-6+squeeze8           Apache HTTP Server metapackage
ii  apache2-mpm-prefork                2.2.16-6+squeeze8           Apache HTTP Server - traditional non-threaded model
ii  apache2-utils                      2.2.16-6+squeeze8           utility programs for webservers
ii  apache2.2-bin                      2.2.16-6+squeeze8           Apache HTTP Server common binary files
ii  apache2.2-common                   2.2.16-6+squeeze8           Apache HTTP Server common files
ii  libapache2-mod-auth-mysql          4.3.9-13+b1                 Apache 2 module for MySQL authentication
ii  libapache2-mod-php5                5.3.3-7+squeeze14           server-side, HTML-embedded scripting language (Apache 2 module)
root@sistemichiocciola:/etc/apache2/sites-enabled# dpkg --list | grep ssl
ii  libssl-dev                         0.9.8o-4squeeze13           SSL development libraries, header files and documentation
ii  libssl0.9.8                        0.9.8o-4squeeze13           SSL shared libraries
ii  openssl                            0.9.8o-4squeeze13           Secure Socket Layer (SSL) binary and related cryptographic tools
ii  openssl-blacklist                  0.5-2                       list of blacklisted OpenSSL RSA keys
ii  ssl-cert                           1.0.28                      simple debconf wrapper for OpenSSL

我的虚拟主机设置:

AuthMySQL On

Auth_MySQL_Host localhost
Auth_MySQL_User XXX
Auth_MySQL_Password YYY
Auth_MySQL_DB users

AuthName "Sistemi Chiocciola Sezione Informatica"
AuthType Basic
#  require valid-user
require group informatica
Auth_MySQL_Encryption_Types Crypt Sha1sum
AuthBasicAuthoritative Off
AuthUserFile /dev/null

Auth_MySQL_Password_Table users
Auth_MYSQL_username_field email
Auth_MYSQL_password_field password
AuthMySQL_Empty_Passwords Off
AuthMySQL_Group_Table http_groups
Auth_MySQL_Group_Field user_group

我是否遗漏了某个包/配置或者别的什么东西?

答案1

看起来加密类型区分大小写,在这种情况下应该是SHA1Sum这样的:

Auth_MySQL_Encryption_Types Crypt SHA1Sum

相关内容