From: | Susan Cassidy <susan(dot)cassidy(at)decisionsciencescorp(dot)com> |
---|---|
To: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: problem connecting to postgres via apache |
Date: | 2014-01-24 19:53:49 |
Message-ID: | CAE3Q8o=R65T1oXfS07w9Ba2zNcfMFqdvnb77YLdK=cvh-2XLiA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
[scassidy(at)jacensolo ~]$ /usr/sbin/sestatus | grep SELinux
SELinux status: enabled
SELinuxfs mount: /selinux
I have yet to find what to do to enable webserver connections.
Susan
On Fri, Jan 24, 2014 at 9:38 AM, Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>wrote:
> On 01/24/2014 09:35 AM, Susan Cassidy wrote:
>
>> I've already checked that. It is enabled. I am running Scientific Linux.
>>
>
> SELinux is enabled?
> The database connection value is enabled to allow or disallow webserver
> connections?
>
>
>>
>> On Fri, Jan 24, 2014 at 8:28 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us
>> <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>> wrote:
>>
>> Susan Cassidy <susan(dot)cassidy(at)decisionsciencescorp(dot)com
>> <mailto:susan(dot)cassidy(at)decisionsciencescorp(dot)com>> writes:
>> > $dbh =
>> DBI->connect("dbi:Pg:dbname=$dbname;host=${dbserver};port=$dbport;",
>> > $dbuser, $dbpasswd) or
>> > errexit( "Unable to connect to dbname $dbname, err:
>> $DBI::errstr");
>>
>> > The exact same connection string works fine in a standalone perl
>> program.
>>
>> Given the permissions errors you mentioned upthread, I'm wondering
>> whether
>> you're running on Red Hat/CentOS, and if so whether SELinux is
>> preventing
>> apache from connecting to unexpected port numbers. I seem to recall
>> that there's a SELinux boolean specifically intended to allow or
>> disallow
>> database connections from webservers, but I couldn't tell you the name
>> offhand.
>>
>> regards, tom lane
>>
>>
>>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)gmail(dot)com
>
From | Date | Subject | |
---|---|---|---|
Next Message | Susan Cassidy | 2014-01-24 19:55:00 | Re: problem connecting to postgres via apache |
Previous Message | Bret Stern | 2014-01-24 17:47:50 | Re: problem connecting to postgres via apache |