[Qgis-developer] QGIS Server - use PGSYSCONFDIR in a server with no postgresql installed
Neumann, Andreas
a.neumann at carto.net
Thu Nov 19 04:00:03 PST 2015
Hi Michaël,
This works for me.
My pg_service.conf file is at /etc/pg_service.conf
And in the Apache configuration it is specified in two files:
/etc/apache2/mods-enabled/env.conf :
SetEnv PGSYSCONFDIR "/etc"
and in
/etc/apache2/mods-enabled/fcgid.conf
FcgidInitialEnv PGSYSCONFDIR "/etc"
I am not sure which one is really used or has precedence - I suspect it
is the fcgid.conf file.
Hope you get this working,
Andreas
On 2015-11-19 12:17, kimaidou wrote:
> Hi all
>
> I have installed QGIS Server in one server (called "map") and PostGreSQL on another (called "pg" ), both on Ubuntu Server 14.04 I would like to access to database only with PostGreSQL services, so in the map server, I did the following steps:
>
> * Create a folder /etc/postgresql
> * Create a file /etc/postgresql/pg_service.conf with some credentials
> * Install postgresql-client to be able to use psql
> * Add a environment variable PGSYSCONFDIR and export it (plus add it in /etc/environment ). Variable : PGSYSCONFDIR=/etc/postgresq'l
> * Test via psql "service=myservice" -> I can connect to the database and get data
>
> When I ask QGIS Server for the GetCapabilities, the layers configured with this service cannot be added. I get the error : "Service myservice not found"
>
> So I added the following line in the fcgid.conf file to explicitely tell Apache (and QGIS Server) to use this value.
> FcgidInitialEnv PGSYSCONFDIR "/etc/postgresql"
>
> But nothing works. I even tried to chmod and chown the service file and folder to let Apache user www-data to read it. I also tried with a quick and dirty chmod 777 , with no luck.
>
> Has anyone some experience in setting up a Server with no postgresql installed locally, and use the pg_service.conf file with QGIS Server ?
>
> Thanks a lot for any clue
> Michaël
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20151119/e2ab8286/attachment.html>
More information about the Qgis-developer
mailing list