|
Frequently Asked Questions v2
|
Using mod_auth_mysql and .htaccess, http authentication can be configured to make use of the ActionApps user database.
This involves:
1. Installing mod_auth_mysql
2. Configuring .htaccess to use ActionApps user database for authentication.
Installing mod_auth_mysql
~~~~~~~~~~~~~~~~~~
(The following method works only for apache with mod_so installed)
1) Download mod_auth_mysql module from http://telia.dl.sourceforge.net/sourceforge/mod-auth-mysql/mod_auth_mysql-3.2.tar.gz ( say in /usr/local/src)
(URL for the project site: http://sourceforge.net/projects/mod-auth-mysql)
2) untar the module ( tar -zxvf mod_auth_mysql-3.2.tar.gz)
3) cd /usr/local/src/mod_auth_mysql-3.2
4) Edit the Makefile to suit your requirement. Edit the APXS and OPTS values. Sample Makefile is provided here:
------------------ Sample Makefile -----------------------------
APXS = /usr/local/apache/bin/apxs # Location of apxs binary
APXSFLAGS =
DSO = mod_auth_mysql.so
SRCS = mod_auth_mysql.c
HDRS = mod_auth_mysql.h
OPTS = -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient
all: $(DSO)
$(DSO): $(SRCS) $(HDRS)
$(APXS) $(APXSFLAGS) -o $(DSO) $(OPTS) -c $(SRCS)
install: $(DSO)
$(APXS) $(APXSFLAGS) $(NAME) -i -A $(DSO)
clean:
-rm -f *.o $(DSO)
---------------------------------------------------------------
5) run make;make install
6) mod_auth_mysql has been installed now. If successfully installed, httpd.conf will now contain the following line:
LoadModule auth_mysql_module libexec/mod_auth_mysql.so
Configuring mod_auth_mysql to work with APC-AA authentication system
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Let the APC-AA DB be aadb
aadb has the table, users with the fields uid, password
now, in your httpd.conf , and in your virtualhost configuration, add the following:
Auth_MySQL_Info myhostname aadbuser aadbpassword
where: myhostname is the host where your aadb database is running
aadbuser is the valid username to access the database
aadbpassword is the valid password to access to access the db.
now, create the .htaccess file, with the following:
Auth_MYSQL on
Auth_MySQL_DB aadb
AuthName "APC-AA Secret Area"
AuthType Basic
Auth_MySQL_Password_Table users
Auth_MySQL_Username_Field uid
Auth_MySQL_Password_Field password
Auth_MySQL_Encryption_Types Plaintext Crypt_DES MySQL
order deny,allow
allow from all
require valid-user
Now, when you try visiting this location in your browser, it should prompt you for the uid/password. Provide you apc-aa uid/password to log in.
Note: Currently, this configuration does not take the group into consideration when authentication. This will be done in the next phase.
Last Edit: Aug 17 2011
<aafaq id=1673> ~ToDo: 1673 How to configure mod_auth_mysql for HTTP authentication with ActionApps authentication system </aafaq>
This FAQ interface was developed
by Jason at Commons.ca
|
APC
ActionApps is a free software content management system initiated by
the Association for Progressive Communications (APC)
APC - Internet and ICTs for social justice and development |