From: | Alexander Pyhalov <alp(at)rsu(dot)ru> |
---|---|
To: | babak badaei <badaei(at)yahoo(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: FreeBSD/Postgres/Apache+PHP |
Date: | 2011-04-01 11:28:36 |
Message-ID: | 4D95B6E4.4070302@rsu.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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!
--
С уважением,
Александр Пыхалов,
системный администратор ЮГИНФО ЮФУ.
From | Date | Subject | |
---|---|---|---|
Next Message | Durumdara | 2011-04-01 15:24:45 | How to get index columns/dir/ord informations? |
Previous Message | Craig Ringer | 2011-04-01 05:15:48 | Re: postgres conferences missing videos? |