mod_auth_dbm
Posted by: charlesC (---.dyson.com)
Date: November 01, 2006 07:29PM

Hi,

I am struggling slightly to enable database authentication with wamp5.

I've used dbmmanage.pl, mod_auth_dbm and AuthDBMUserFile (in .htaccess) happily with EasyPHP (which had apache 1.3) . But with Apache 2 and wampserver I cannot find the information to get this working - I was hoping to be able to use the same method and just transfer the password files over.

In httpd.conf I have enabled 'LoadModule auth_dbm_module modules/mod_auth_dbm.so', but there didn't seem to be any associated 'AddModule mod_auth_dbm.c' to enable (which is what had to do for Apache 1.3) - in fact with apache2 there didn't seem to be any 'ClearModuleList' at all.

Any help appreciated. Thank you very much.

Options: ReplyQuote
Re: mod_auth_dbm
Posted by: CyberSpatium (71.237.217.---)
Date: November 01, 2006 09:07PM

wamp does not come with perl installed so you cannot run .pl or .cgi files. you need to install the wamp active perl add-on. after you install the add-on you will need to make some changes to your httpd.conf file to get perl to work.

open your httpd.conf file and find this section:

DocumentRoot "C:/wamp/www"

#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>


Change the Options FollowSymLinks line to this:
Options FollowSymLinks +ExecCGI
ScriptAlias /cgi-bin/ c:/wamp/cgi-bin/


now you need to find this line:
#AddHandler cgi-script .cgi

remove the # in front of that line to enable it and then add .pl to it to allow both .cgi and .pl files like this:
AddHandler cgi-script .cgi[ .pl/i]

save the file and restart apache for you new settings to take effect.

now you need to create a file called cgi-bin in your c:\wamp folder. this is where you will out your cgi and pl files.

CyberSpatium
WAMP English Forum Admin

Options: ReplyQuote
Re: mod_auth_dbm
Posted by: charlesC (---.dyson.com)
Date: November 03, 2006 03:46PM

Thank you for your reply.

Perl is not the problem, I had that bit working already - it was only to run dbmmanage.pl from the command line (not through the browser) - I don't need perl cgi.

The bit I was having problems with was configuring Apache2 to use mod_auth_dbm so that I can use an indexed (fast) password file for authentication, which I have been using fine with Apache 1.3.

The settings I had previously with Apache 1.3 which worked was this:

In httpd.conf:
LoadModule dbm_auth_module modules/mod_auth_dbm.so

and further on....

AddModule mod_auth_dbm.c

Then in my www folder I had an access.conf file that had:

AllowOverride AuthConfig

And a .htaccess file in www containing:

.htaccess:
AuthName "XYZ"
AuthType Basic
AuthDBMUserFile c:/store/passwords.dat
require valid-user
IndexIgnore *

But I do not know how to setup httpd.conf for Apache 2.0 to do the same thing!

Thanks v. much.
Charles.

Options: ReplyQuote
Re: mod_auth_dbm
Posted by: CyberSpatium (71.237.217.---)
Date: November 03, 2006 08:05PM

just enable LoadModule auth_dbm_module modules/mod_auth_dbm.so in httpd.conf fileby removing the # in front, restart apache.

CyberSpatium
WAMP English Forum Admin

Options: ReplyQuote


Sorry, only registered users may post in this forum.