mod_authn_dbm.so and dbmmanage are not playing well together, causing [500] Internal Server Error
Bill Hernandez
ms at mac-specialist.com
Wed Dec 24 20:12:05 PST 2008
Problem with mod_authn_dbm.so
I have been using the standard flat file created by htpasswd, but
tried to switch to mod_authn_dbm.so , So I went to http://httpd.apache.org/docs/2.0/programs/dbmmanage.html
and followed the plan...
Using the dbmmanage that MacPorts installed with apache2, I created
some user password records.
dbmmanage does not have a way to specify AuthDBMType, so I created the
records and then tried to figure out what type of records dbmmanage
was actually generating by trying the five AuthDBMType(s) below, but
none of them worked.
-------------------------------------------------
The log showed after the last restart :
-------------------------------------------------
[Wed Dec 24 21:15:47 2008] [notice] Apache/2.2.9 (Unix) mod_ssl/2.2.9
OpenSSL/0.9.7l DAV/2 PHP/5.2.6 configured -- resuming normal operations
/www/etc/dbmpasswd: unexpected file type or format
[Wed Dec 24 21:16:02 2008] [error] [client ::1] (120022)APR does not
understand this error code: could not open dbm (type DB) auth file: /
www/etc/dbmpasswd
-------------------------------------------------
The permissions are set the same as ones for the standard flat file.
-------------------------------------------------
Displaying the records at the terminal :
-------------------------------------------------
$ path="/www/etc/dbmpasswd" ; dbmmanage $path view
---> shows all the user password records
-------------------------------------------------
The virtual host file contains
-------------------------------------------------
<Directory /www/secure>
AllowOverride None
Order Allow,Deny
Allow from 127.0.0.1
Allow from localhost
Satisfy All
AuthType basic
AuthName "private area"
AuthBasicProvider dbm
AuthDBMType default
# I tried all five of the AuthDBMType(s) below
# [500] INTERNAL SERVER ERROR
# AuthDBMType default
# AuthDBMType DB
# AuthDBMType GDBM
# AuthDBMType NDBM
# AuthDBMType SDBM
AuthDBMUserFile /www/etc/dbmpasswd
Require valid-user
</Directory>
These are the modules that deal with auth that are installed
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbd_module modules/mod_authn_dbd.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_owner_module modules/mod_authz_owner.so
# LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
Any ideas what else to try ?
More information about the macports-users
mailing list