Using MySQL for authentication
?
1th step: Download the MySQL authentication module and rename it to mod_auth_mysql.so file, and save it in Apache modules directory
2nd step: Apache to load this function module
LoadModule the directory where the module name resides
Example:
???? LoadModule Mysql_auth_module modules/mod_auth_mysql.so
3rd Step: Establish the authentication database
???? User password stored data table structure, must have User name fields, password field, user Group field
4th Step: Configure authentication
A: Authentication domain
AuthName ' www.234.com '
B: Authentication method
AuthType Basic
C: Turn on MySQL authentication
Authmysqlenable on
D: Set up the authentication host
Authmysqlhost localhost
E: Authenticated user name
Authmysqluser Root
F: Authentication password
Authmysqlpassword Root
G: Certified Database
Authmysqldb httpd
H: Certified Tables
Authmysqlusertable Auth
I: Authenticated user name field
Authmysqlnamefield user_name
J: Certified Password field
Authmysqlpasswordfield User_password
K: Password encryption method
Authmysqlpwencryption MD5
L: Certified User
Require Valida-user
Example:
Apache uses MySQL Authenticated users