pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: darcy@druid.net
To: Jeff MacDonald <jeff@hub.org>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: mod_auth_pgsql
Date: Fri, 30 Mar 2001 07:36:29 -0500 (EST)
Message-ID: <20010330123629.90E701A6E@druid.net> (raw)
In-Reply-To: <Pine.BSF.4.21.0103291609140.431-100000@wired.hub.org>

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@{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.



view thread (2+ messages)

Message-ID: <20010330123629.90E701A6E@druid.net>
Permalink:  ../20010330123629.90E701A6E@druid.net/
Also on:    postgresql.org/message-id/20010330123629.90E701A6E@druid.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: darcy@druid.net, jeff@hub.org
  Subject: Re: mod_auth_pgsql
  In-Reply-To: <20010330123629.90E701A6E@druid.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox