Search Postgresql Archives

Re: FreeBSD/Postgres/Apache+PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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!



--
Ð ÑÐÐÐÐÐÐÐÐ,
ÐÐÐÐÑÐÐÐÑ ÐÑÑÐÐÐÐ,
ÑÐÑÑÐÐÐÑÐ ÐÐÐÐÐÐÑÑÑÐÑÐÑ ÐÐÐÐÐÐ ÐÐÐ.

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux