1 |
On Thu, April 25, 2013 20:26, Joseph wrote: |
2 |
> On 04/25/13 18:57, J. Roeleveld wrote: |
3 |
>>> So pg_hba.conf only controls direct connections to postgreSQL. |
4 |
>> |
5 |
>>Correct. |
6 |
>> |
7 |
>>> Since "apache" group is in postgres user; apache was given permission |
8 |
>>> to |
9 |
>>> access the database in this case py-passing the setting in pg_hba.conf |
10 |
>> |
11 |
>>Wrong, Postgresql does not check group-ownership. Your pg_hba.conf file |
12 |
>>will have a setting that allows Apache to connect. |
13 |
>> |
14 |
>>> Is there a way to force sequence: |
15 |
>>> Apache/website <-> pg_hba.conf <-> Postgresql |
16 |
>> |
17 |
>>Postgresql will always read the pg_hba.conf file and use that to |
18 |
>> determine |
19 |
>>who can and can not connect directly to Postgresql. |
20 |
>> |
21 |
>>-- |
22 |
>>Joost |
23 |
> |
24 |
> I've tired with this line: |
25 |
> local clinic sql-ledger trust |
26 |
> |
27 |
> I can connect to "clinic" database form localhost and any box on the |
28 |
> network. It works OK |
29 |
> But I when I tried to further limit the database to a single IP, |
30 |
> postgresql refused to start. |
31 |
> |
32 |
> local clinic sql-ledger 10.0.0.100/32 trust |
33 |
|
34 |
This line is wrong, please read the comments in the supplied "pg_hba.conf" |
35 |
file: |
36 |
# "local" is for Unix domain socket connections only |
37 |
|
38 |
If you want to limit to an IP-address, then you nneed to use "host" |
39 |
|
40 |
-- |
41 |
Joost |