Apache2/mod authnz external

Preface
With mod_authnz_external you are able to use any kind of authentication method you like, for example a script you wrote, LDAP, PAM or whatever.

Why not mod_auth_pam?
There are three reasons why you should not use mod_auth_pam:
 * The module isn't under active development
 * Apache 2.2 has a new auth-handling and mod_auth_pam needs to disable it to work
 * Apache with mod_auth_pam needs read-access to, which may be a security risk

Installation
Two programs are needed, which are both provided by portage (you might have to unmask them):
 * : Provides the interface to apache authentication.
 * : Handles the authentication. You may choose to use another program instead, if you have special needs.

Configuration
Instead we create a new file that can be included from within virtual hosts:
 * Edit your and add -D AUTHNZ_EXTERNAL -D AUTH_SYS_GROUP to APACHE2_OPTS
 * You should not edit, because:
 * 1) It can get overwritten as a result of running.
 * 2) Any external authenticator defined in the  file is not accessible from within a   section; it is only accessible from within .htaccess files.

Include this file at the bottom of all your virtual servers where you need authentication with this module, for example default vhost and ssl vhost:

AuthType Basic AuthName "This is private" AuthBasicProvider external AuthExternal pwauth GroupExternal unixgroup ... Don't forget to append your require/order/...-statements.
 * Configure your secured web-area to use mod_authnz_external:
 * Restart your apache