Re: mod_auth_pgsql

From: darcy(at)druid(dot)net (D'Arcy J(dot)M(dot) Cain)
To: Jeff MacDonald <jeff(at)hub(dot)org>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: mod_auth_pgsql
Date: 2001-03-30 12:36:29
Message-ID: 20010330123629.90E701A6E@druid.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

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 on
AuthPGEncrypted off # needed if 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(at){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.

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Eduardo Kotujansky 2001-03-30 13:06:38 client for windows
Previous Message J. T. Vermeulen 2001-03-30 12:24:45 Re: c++ compile/link problem