pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedFreebsd/Postgres/Apache+PHP
2+ messages / 2 participants
[nested] [flat]
* Freebsd/Postgres/Apache+PHP
@ 2011-03-31 19:18 babak badaei <badaei@yahoo.com>
0 siblings, 1 reply; 2+ messages in thread
From: babak badaei @ 2011-03-31 19:18 UTC (permalink / raw)
To: pgsql-admin
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!
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Freebsd/Postgres/Apache+PHP
@ 2011-03-31 20:57 Steve Crawford <scrawford@pinpointresearch.com>
parent: babak badaei <badaei@yahoo.com>
0 siblings, 0 replies; 2+ messages in thread
From: Steve Crawford @ 2011-03-31 20:57 UTC (permalink / raw)
To: babak badaei <badaei@yahoo.com>; +Cc: pgsql-admin
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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2011-03-31 20:57 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-03-31 19:18 Freebsd/Postgres/Apache+PHP babak badaei <badaei@yahoo.com>
2011-03-31 20:57 ` Steve Crawford <scrawford@pinpointresearch.com>
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