Re: FreeBSD/Postgres/Apache+PHP - Mailing list pgsql-general

From Alexander Pyhalov
Subject Re: FreeBSD/Postgres/Apache+PHP
Date
Msg-id 4D95B6E4.4070302@rsu.ru
Whole thread Raw
In response to FreeBSD/Postgres/Apache+PHP  (babak badaei <badaei@yahoo.com>)
List pgsql-general
Hello.
When you jail a process, all its attempt to bind to 127.0.0.1 address
will be unsuccessful, and all its attempt to bind to * (all addresses)
will be successful, but in fact it will bind only to jail's IP. So, when
you try to connect to jail's pgsql from jail process will use jail's ip
address as source and destination address. Alternatively, you can
connect to unix socket (e.g. /tmp/.s.PGSQL.5432). For this you need to
allow local access (something like that in pg_hba.conf):

local db user md5

On 03/31/2011 23:21, babak badaei wrote:
> The problem is that when I load a script that connects to the database, Postgres says Unable to connect to PostgreSQL
server:FATAL: no pg_hba.conf entry for host "x.x.x.x" (my actual web IP). I have done the following on the host
machine:
> I'd like Apache/PHP to just connect to Postgres localhost, not via the jail's IP--thus, no change to pg_hba.conf is
needed.
>
> If you guys have any suggestions it would be very much appreciated!



--
С уважением,
Александр Пыхалов,
системный администратор ЮГИНФО ЮФУ.

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: postgres conferences missing videos?
Next
From: Durumdara
Date:
Subject: How to get index columns/dir/ord informations?