Thread: mod_auth_pgsql
Does anyone know what directives to add to a .htaccess file to allow mod_auth_pgsql to connnect to password protected databases as certain users ? Thanks Jeff MacDonald, ----------------------------------------------------- PostgreSQL Inc | Hub.Org Networking Services jeff@pgsql.com | jeff@hub.org www.pgsql.com | www.hub.org 1-902-542-0713 | 1-902-542-3657 ----------------------------------------------------- Facsimile : 1 902 542 5386 IRC Nick : bignose PGP Public Key : http://bignose.hub.org/public.txt
Thus spake Jeff MacDonald > Does anyone know what directives to add to a .htaccess file > to allow mod_auth_pgsql to connnect to password protected > databases as certain users ? This first may be required in the httpd.conf file. LoadModule auth_pg_module /usr/lib/httpd/mod_auth_pg.so You may also need something like this. <Directory /> Options FollowSymLinks ExecCGI Indexes AllowOverride All AuthPGAuthoritative off </Directory> In your .htaccess, something like this. AuthName "My Realm" AuthType Basic require valid-user AuthPGAuthoritative onAuthPGEncrypted off # neededif you store passwords as plain text AuthPGHost "db.mydomain.com" # needed if database is on other system AuthPGDatabase"dbname" AuthPGQuery "SELECT pwd FROM table WHERE login = '%s'" -- D'Arcy J.M. Cain <darcy@{druid|vex}.net> | Democracy is three wolves http://www.druid.net/darcy/ | and a sheep voting on +1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.