david4514
06-22-2007, 08:37 PM
I am new at all of this so I probably have made a simple mistake.
I am trying to set up a AuthType Basic system using mod_auth_DB to protect a subdirectory. I expect to have about 500 users in the database, which seems to be more than what would be appropriate for the flat file create with htpasswd and less than what would be needed with a MySQL solution. Though, for other reasons the MySQL solution might be better. For now, I am just testing the mod_auth_DB support.
Here is an approximation of my .htaccess file (domain names, directory names, user names... changed to protect the innocent:yeah: ) which is in my directory to be protected.
AuthName "private area"
AuthType Basic
AuthDBUserFile /big/dom/xdom/secret/.password
require valid-user
I used dbmmanage to create and add users to the .password database. This seemed to work, the names displayed with the dbmmanage .password view command. The file .password command showed that it was a Berkley DB database;
When I navigate with my browser to the protected directory, the logon prompt appears, but it never succeeds. The Apache error log shows:
[Fri Jun 22 18:47:13 2007] [error] [client 68.105.184.33] (2)No such file or directory: could not open db auth file: /big/dom/xdom/secret/.password
[Fri Jun 22 18:47:13 2007] [error] [client 68.105.184.33] DB user username not found: /big/dom/xdom/www/protected_directory/index.html
As an alternative, I tried using AuthDBMUserFile directive in .htaccess. The Apache error log say that it is an invalid command.
I also tried using Auth_MySQL_* directives using the mod_auth_MySQL support and none of those directive were valid either.
phpinfo.php shows that mod_auth_db and mod_auth_mysql have been loaded into Apache. mod_auth_dbm does not show up as having been loaded.
Is there something that needs to be enabled to get database support for authentication? I hope that I am just missing something simple, but I can't seem to get any of these options to work.
I am trying to set up a AuthType Basic system using mod_auth_DB to protect a subdirectory. I expect to have about 500 users in the database, which seems to be more than what would be appropriate for the flat file create with htpasswd and less than what would be needed with a MySQL solution. Though, for other reasons the MySQL solution might be better. For now, I am just testing the mod_auth_DB support.
Here is an approximation of my .htaccess file (domain names, directory names, user names... changed to protect the innocent:yeah: ) which is in my directory to be protected.
AuthName "private area"
AuthType Basic
AuthDBUserFile /big/dom/xdom/secret/.password
require valid-user
I used dbmmanage to create and add users to the .password database. This seemed to work, the names displayed with the dbmmanage .password view command. The file .password command showed that it was a Berkley DB database;
When I navigate with my browser to the protected directory, the logon prompt appears, but it never succeeds. The Apache error log shows:
[Fri Jun 22 18:47:13 2007] [error] [client 68.105.184.33] (2)No such file or directory: could not open db auth file: /big/dom/xdom/secret/.password
[Fri Jun 22 18:47:13 2007] [error] [client 68.105.184.33] DB user username not found: /big/dom/xdom/www/protected_directory/index.html
As an alternative, I tried using AuthDBMUserFile directive in .htaccess. The Apache error log say that it is an invalid command.
I also tried using Auth_MySQL_* directives using the mod_auth_MySQL support and none of those directive were valid either.
phpinfo.php shows that mod_auth_db and mod_auth_mysql have been loaded into Apache. mod_auth_dbm does not show up as having been loaded.
Is there something that needs to be enabled to get database support for authentication? I hope that I am just missing something simple, but I can't seem to get any of these options to work.