mod-authnz-mysql Code
Status: Beta
Brought to you by:
bromatom
Prerequisites °°°°°°°°°°°°° To compile this module you need : 1. the developement header files for the MySQL client 2. the developement header files for the Apache 2.2.x webserver 3. the developement header files for the Apache APR library 4. and a C compiler like gcc For Debian use the "apt-get"-command to install the requirements: "apt-get install libmysqlclient15-dev apache2-threaded-dev libapr1-dev gcc" Compile the module °°°°°°°°°°°°°°°°°° To compile the module use the "apxs2"-command : "apxs2 -c -lmysqlclient mod_authnz_mysql.c" If an error occurs that the "mysql.h" header file is not found, specify the directory of "mysql.h" with the "-L" option : "apxs2 -c -lmysqlclient -I/usr/include/mysql mod_authnz_mysql.c" If the MySQL client library is not found, specify the directory where the shared object "libmysqlclient.so" can be found (add the "-L" option) : "apxs2 -c -lmysqlclient -L/usr/lib/mysql -I/usr/include/mysql mod_authnz_mysql.c" Install the module °°°°°°°°°°°°°°°°°° After successfully compiling the module you can install it to the directory where the other Apache modules are : "apxs2 -i mod_authnz_mysql.la" Create a text file "authnz_mysql.load" in the "mods-available" directory of the Apache2 webserver. For example : "touch /etc/apache2/mods-available/authnz_mysql.load" In this text file enter the following line : "LoadModule authnz_mysql_module /usr/lib/apache2/modules/mod_authnz_mysql.so" (The directory where the file "mod_authnz_mysql.so" can be found may be different. For Debian it is "/usr/lib/apache2/modules/".) To activate the module use the "a2enmod"-command : "a2enmod authnz_mysql" Now restart the Apache2 webserver.