httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Stahr" <da...@prairiesys.com>
Subject RE: [users@httpd] Authenication using MySql
Date Thu, 10 Oct 2002 15:40:11 GMT
The table format can be anything you choose.  It its most simple form:

table name: users

columns: username, password

That's all.  Also for MySQL you'd need to make sure there was a user to
connect to the database as, you need that in the mysql->users table.  If
you're not familiar with MySQL already, going this route is probably
ill-advised.

Dave


> -----Original Message-----
> From: 
> users-return-15315-daves=prairiesys.com@httpd.apache.org 
> [mailto:users-return-15315-daves=prairiesys.com@httpd.apache.o
> rg] On Behalf Of Curley, Thomas
> Sent: Thursday, October 10, 2002 7:43 AM
> To: users@httpd.apache.org; daves@prairiesys.com
> Subject: [users@httpd] Authenication using MySql
> 
> 
> 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
> 


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