[NANOWEB DOCUMENTATION]

NANOWEB, the aEGiS PHP web server

mod_auth_mysql

The most flexible authentication is to use an already existing mysql database containing user names and passwords. In order to activate this authentication mechanism you need to load this modules of course and set it up as follows:

AuthRealm = realm name (will be shown as info text in most browsers)

# use the mysql database login lookup module
AuthRequire = MYSQL

# following directives specify the database and the server
# it is running on as well as the db access password
AuthMysqlHost  = localhost
AuthMysqlUser  = db_user
AuthMysqlPass  = db_pass
AuthMysqlDB    = db_name

# you can use any existing table that contains
# login/password pairs, by giving this authentication
# module the correct table and column names
AuthMysqlTable = table_name
AuthMysqlLoginColumn = login_field_name
AuthMysqlPassColumn  = password_field_name

# "plain" if the password lies unencoded in the database,
# or "crypt", "md5" if the system hash functions were
# used, and "mysql" if MySQL's password() encoded it
AuthMysqlPassType = plain | crypt | md5 | mysql


So the funny thing about this authentication scheme is that it allows easy integration of HTTP authentication areas into an already existing portal site like SomethingNuke, because the user database and the user management tools already exist.

Note that you can use different databases/tables, as you can restrict access on a per-directory basis when you give the AuthRequire directive in one of the .nwaccess files.


NANOWEB, the aEGiS PHP web server