httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Stahr" <>
Subject RE: [users@httpd] Authenication using MySql
Date Wed, 09 Oct 2002 19:24:31 GMT
> I would like your recommendation/ideas on implementing a prod 
> quality MySql db for storing authentication data.  As far as 
> I can see mod_auth_mysql from the bourbon is a popular choice 

I'm a firm believer in Apache w/ MySQL using DBI/DBD....

First install DBI:

Then Mysql's DBI extensions:

And you'll need the apache module for the actual authentication:

Here's an example snippet from my httpd.conf: (username/password changed
of course)

<Directory "/usr/local/www/admin">
AllowOverride All
  AuthName 'Website Administration'
  AuthType Basic
  PerlAuthenHandler Apache::AuthDBI::authen
  PerlSetVar Auth_DBI_data_source   dbi:mysql:database=webstuff;host=db
  PerlSetVar Auth_DBI_username      @p@ch3
  PerlSetVar Auth_DBI_password      p@$$w0rd

  PerlSetVar Auth_DBI_pwd_table     users
  PerlSetVar Auth_DBI_uid_field     username
  PerlSetVar Auth_DBI_pwd_field     password
  PerlSetVar Auth_DBI_encrypted     off
  PerlSetVar Auth_DBI_whereclause	"status = 1"
  require valid-user

Works well for me!


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message