Gentoo Archives: gentoo-user

From: "J. Roeleveld" <joost@××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] PosgreSQL - pg_hba.conf localhost access only
Date: Wed, 24 Apr 2013 05:12:15
Message-Id: b06677f542d374eeb418e947ea69a1f1.squirrel@www.antarean.org
In Reply to: Re: [gentoo-user] PosgreSQL - pg_hba.conf localhost access only by Joseph
1 On Wed, April 24, 2013 00:16, Joseph wrote:
2 > On 04/23/13 20:10, J. Roeleveld wrote:
3
4 <SNIP>
5
6
7 >>I am guessing Apache is running on the same machine as your Postgresql
8 >> server?
9 >>
10 >>In this case. The connection will always originate from localhost and
11 >> Postgresql is behaving as it should.
12 >>
13 >>You will need to secure access to the website to avoid people accessing
14 >> it.
15 >>
16 >
17 > Yes, every machine I run has apache on it, so Postgresql server runs on
18 > it as well.
19 > If I'm connecting from another network machine to a server, how does it
20 > originate from localhost?
21 >
22 > Something is not correct.
23
24 I'll try to explain.
25
26 When you connect to the website (Apache) the connection Apache sees
27 originates from your machine.
28
29 When Apache then needs to access PostgreSQL to access the data needed for
30 the website, Postgresql sees the connection originating from Apache, which
31 is running on the same machine.
32
33 --
34 Joost

Replies

Subject Author
Re: [gentoo-user] PosgreSQL - pg_hba.conf localhost access only Joseph <syscon780@×××××.com>