Hi! Yes, I did that. The environment variable PGSYSCONFDIR is set also on the server machine, it points to the same connection file and it works: QGIS on the server pc can load layers with this service parameter.
That's why I expected my (bundeled) QGIS server to do the same and use the pg service within the wms, but it gives only an empty wms, named like the .qgs, without the actual layers. I'm using QGIS 2.18.23 here, maybe it's a bug? Beste regards Thomas > Carlos López PSIG <[email protected]> hat am 6. September 2018 um 13:03 > geschrieben: > > > Hi, > You should to define environment variables to use pg_service.conf in server > too. > Of course, the service should to use tha same name. > > Test without define connection to database using "service", therefore write > host/port/databse/user& password to confirm that the connection it's ok. > > luck, > > Best regards, > > * <http://psig.es>* > *PSIG* > Implementació, gestió i formació SIG > > *Carlos López Quintanilla* > > www.psig.es > [email protected] > +34 699.680.261 > > Nota legal: Este mensaje y cualquier archivo adjunto está destinado > únicamente a la > persona a quien se dirige y es confidencial. Si usted ha recibido este > mensaje por > error, por favor, comuníqueselo al remitente y bórrelo inmediatamente. La > utilización , > revelación y/o reproducción del mensaje puede constituir un delito. > > Protección de Datos: Le informamos que sus datos de contacto electrónico se > hallan > incorporados a un fichero titularidad de CARLOS LÓPEZ QUINTANILLA, al > objeto de > envío de información, respuesta a consultas y contactos genéricos. > Puede ejercer los derechos de acceso, rectificación, cancelación y > oposición que > establece la LOPD en cualquier momento, mediante escrito, acompañado de > copia de > documento oficial que le identifique, dirigido a CARLOS LÓPEZ QUINTANILLA > CL. P > arellada, 8 E2 de Corbera de Llobregat, 08757-Barcelona. > > También podrá oponerse a nuestros envíos de comunicaciones comerciales > (Art.21.2 > de la LSSI) a través de la siguiente dirección de correo electrónico: > [email protected] > > > > El jue., 6 sept. 2018 a las 12:37, Thomas Schüttenberg (<[email protected]>) > escribió: > > > Hi there! > > > > I wonder if/how the QGIS server (2.18) is able to use PostgeSQL service > > connection files [1]. > > > > I have a project file with postgis layers, that are connected via the > > service parameter (instead of hostname/port...). These are defined in > > pg_service.conf and work. > > > > When I serve this project with QGIS server 2.18 as wms, connecting the wms > > (in QGIS desktop) works, but it does not contain any layers. > > > > A WMS made from the same project and datasource but with full database > > credentials works als usual. > > > > Thanks for any hint, maybe I just miss something. > > > > Cheers > > Thomas > > _______________________________________________ > > Qgis-user mailing list > > [email protected] > > List info: https://lists.osgeo.org/mailman/listinfo/qgis-user > > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user _______________________________________________ Qgis-user mailing list [email protected] List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
