BUILDING mod_auth_mysql
=======================

To build mod_auth_mysql as a DSO:

For either Apache 1.x or Apache 2.x:

apxs -c -lmysqlclient -lm -lz mod_auth_mysql.c

Note: The option -D APACHE2 for Apache 2.x is no longer required.  The module 
determines the correct version from the Apache header files

If the mysql.h header file cannot be found, add the -I option to specify the
directory where mysql.h can be found.

If the mysqlclient library cannot be found, add the -L option to specify the
directory where libmysqlclient.so can be found.  

Example:

apxs -c -L/usr/lib/mysql -I/usr/include/mysql -lmysqlclient -lm -lz mod_auth_mysql.c

IMPORTANT NOTE: The parameters are somewhat position sensitive.
mod_auth_mysql.c MUST be the last parameter in the statement.


INSTALLING in the Apache Directory
==================================

After building the module, you need to install it to your modules directory.

Apache 1.x:
apxs -i mod_auth_mysql.so

Apache 2.x:
apxs -i mod_auth_mysql.la

Next, add the following directive to httpd.conf:
LoadModule mysql_auth_module modules/mod_auth_mysql.so


Advanced Encryption Standard (AES) encryption
=============================================

AES Encryption is available with MySQL Version 4.0.2 and later.  To enable AES
encrytion, add the follwing two parameters to the first apxs command:

  -DAES -lmysys

The first parameter generates the code in mod_auth_mysql to support AES
encryption, while the second links in the mysql library routines for the
encryption.


Additional Compiler Options
===========================

You can specify the following compile time options with the -D parameter
to set default values for many of the configuration paramters (see CONFIGURATION
for descriptions of the options)

Example:

apxs -c -DHOST=localhost -lmysqlclient -lm -lz mod_auth_mysql.c


Configuration Parameter		Option		Valid Values (1)(2)
-----------------------		------		------------
AuthMySQLHost			HOST		"localhost", host name or ip address
AuthMySQLPort			PORT		integer port number
AuthMySQLSocket			SOCKET		full path name of UNIX socket to use
AuthMySQLUser			USER		MySQL user id
AuthMySQLPassword		PASSWORD	MySQL password
AuthMySQLDB			DB		MySQL database
AuthMySQLPwTable		PWTABLE		MySQL table to use
AuthMySQlNameField		NAMEFIELD	MySQL column name
AuthMySQLPasswordField		PASSWORDFIELD	MySQL column name
AuthMySQLPwEncryption		ENCRYPTION(3,4)	"none", "crypt", "scrambled", "md5", "aes", "sha1"
AuthMySQLSaltField		SALT		"<>", <string> or MySQL column name
AuthMySQLKeepAlive		KEEPALIVE	"0", "1"
AuthMySQLAuthoritative		AUTHORITATIVE	"0", "1"
AuthMySQLNoPassword		NOPASSWORD	"0", "1"
AuthMySQLEnable			ENABLE		"0", "1"

Notes:
(1) Values in quotes are valid values.  Do not use the quotes in the compile
    line, i.e.
    WRONG:
	apxs -c -D HOST="localhost" ... 
    RIGHT:
	apxs -c -D HOST=localhost
	
    Other values not in quotes are descriptions of the values to be entered.

(2) For 0 and 1 values, 0 is false and 1 is true

(3) "aes" is valid only with MySQL 4.0.2 or later.

(4) If this option is specified, you will NOT be able to use the following
    (depricated) options in your Apache configuration:
	AuthMySQLCryptedPasswords
	AuthMySQLScrambledPasswords
	AuthMySQLMD5Passwords
    You will be able to override the default with the AuthMySQLPwEncryption parameter.
    
