[NANOWEB DOCUMENTATION]

NANOWEB, the aEGiS PHP web server

PostgreSQL Authentication Module

This module can access a PostgreSQL database to fetch user names and passwords for http authentication from it. Works like mod_auth_mysql for MySQL databases.
As you can have several different authentication method modules loaded in nanoweb, you must select this one for the directory where authentication is required (following directives must be put in the .nwaccess file):

AuthRealm = realm name

# use the postgres database login lookup module
AuthRequire = PGSQL

# following directives specify the database and the server
# it is running on as well as the db access password
AuthPgsqlHost  = localhost
AuthPgsqlUser  = db_user
AuthPgsqlPass  = db_pass
AuthPgsqlDB    = db_name

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

# "plain" if the password lies unencoded in the database,
# "md5" if the system hash function was used
AuthPgsqlPassType = plain | md5





NANOWEB, the aEGiS PHP web server