httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Curley, Thomas" <thomas.cur...@euroconex.com>
Subject [users@httpd] Authenication using MySql
Date Thu, 10 Oct 2002 12:43:25 GMT
Dave,
thanks - is there some table creation etc to do in MySql db as well


Thomas




-----Original Message-----
From: Dave Stahr [mailto:daves@prairiesys.com]
Sent: 09 October 2002 20:25
To: users@httpd.apache.org
Subject: RE: [users@httpd] Authenication using MySql


> 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:
http://www.cpan.org/modules/by-module/DBI/DBI-1.201.tar.gz

Then Mysql's DBI extensions:
http://www.cpan.org/modules/by-module/Mysql/DBD-mysql-2.1020.tar.gz

And you'll need the apache module for the actual authentication:
http://www.cpan.org/modules/by-module/Apache/Apache-DBI-0.89.tar.gz

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
</Directory>

Works well for me!

Dave



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message