[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-admin
Subject:    Re: [ADMIN] Freebsd/Postgres/Apache+PHP
From:       Steve Crawford <scrawford () pinpointresearch ! com>
Date:       2011-03-31 20:57:56
Message-ID: 4D94EAD4.5050302 () pinpointresearch ! com
[Download RAW message or body]

On 03/31/2011 12:18 PM, babak badaei wrote:
> Hello Postgres Community,
> 
> Thank you guys very much for PostgreSQL. To me, its the best database management \
> system under the sun. I am setting up a new jail configuration on FreeBSD with \
> sockets and everything enabled. I can ping localhost fine. 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!
> 
I have no experience actually using a modern FreeBSD jail, but I do have 
some questions?

1. Are PHP and PostgreSQL running in different jails?

2. What are the addresses PostgreSQL is set to listen on?

3. What PHP statement are you using to establish the connection?

4. If PHP and PostgreSQL are on different jails,


1. Be sure you are connecting with localhost, not local unix domain 
sockets (it appears you are based on the error message).

2. Is PHP running on a different jail than PHP? If my reading is 
correct, a FreeBSD jail is basically a virtual host and has its own IP 
addresses and I doubt that the loopback localnet is shared among those 
hosts.

3. What is the IP address of the server and of the client and what PHP 
connection statement are you using?

Cheers,
Steve


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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic