[Lizmap-de] QGIS and Postgis

Wolfgang Meinolf wmeinolf at bbv-deutschland.de
Di Feb 15 08:25:20 PST 2022


Hm, on my machine I have /home/gisuserhome and /home/qgis. My Portals are located in separate folders under /home/gisuserhome, e.g. /home/gisuserhome/portal1, /home/gisuserhome/portal2 and so on. Owner of these folders is gisuserhome.

In /home/qgis I just see 2 folders called qgisserverdb and projects. Owner of these folders is www-data. I installed the entire server about 18 months ago, so it’s difficult to remember.

So I tried to place the „.pg_service.conf“ in both home dirs, gisuserhome and qgis, but without success. I also ran pg_config –sysconfdir, which lead me to /etc/postgresql-common and placed the „.pg_service.conf“ there without success.

How can I check the user, used for QGIS Server?

Von: Etienne Trimaille <etienne.trimaille at gmail.com>
Gesendet: Dienstag, 15. Februar 2022 16:33
An: Wolfgang Meinolf <wmeinolf at bbv-deutschland.de>
Cc: lizmap-de at lists.osgeo.org
Betreff: Re: [Lizmap-de] QGIS and Postgis

Hi,

You need to check the user used for QGIS Server.
Does it use /home/gisuserhome ?

Try to set explicitly the path to the service file with PGSERVICEFILE when launching QGIS Server.

QGIS_SERVER_IGNORE_BAD_LAYERS is very convenient.
https://docs.qgis.org/3.22/en/docs/server_manual/config.html#environment-variables

Le mar. 15 févr. 2022 à 16:25, Wolfgang Meinolf <wmeinolf at bbv-deutschland.de<mailto:wmeinolf at bbv-deutschland.de>> a écrit :
Hallo zusammen,
auf meinem Web Server (UBUNTU) läuft Lizmap mit QGIS Server unter Apache und Postgres mit Postgis Erweiterung. Die Postgis credentials habe ich auf meinem Windows PC in pg_service.conf. Darin auf dem PC die URL des Webservers. Die gleiche pg_service.conf ist auf dem Webserver unter /home/gisuserhome, also meinem Home Verzeichnis dort, nur natürlich mit punkt davor, also „.pg_service.conf“. Ausserdem ist die host adresse dort „localhost“.

Ein QGS Projekt auf meinem PC enthält ausschließlich einen Postgis Layer. In Qgis funktioniert das Ganze einwandfrei, die credentials kommen offensichtlich aus der pg_service.conf. Lade ich das QGS und Lizmap cfg file auf meinen Server zeigt Lizmap Service non disponible. Offensichtlich kann der POSTGIS Layer nicht geöffnet werden. Ist ja sonst kein Layer im Projekt.

Was mache ich falsch?

Gruß
Wolfgang
--
Lizmap-de mailing list
Lizmap-de at lists.osgeo.org<mailto:Lizmap-de at lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/lizmap-de
-------------- nächster Teil --------------
Ein Dateianhang mit HTML-Daten wurde abgetrennt...
URL: <http://lists.osgeo.org/pipermail/lizmap-de/attachments/20220215/9a08ab2b/attachment-0001.html>
-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname   : smime.p7s
Dateityp    : application/x-pkcs7-signature
Dateigröße  : 3641 bytes
Beschreibung: nicht verfügbar
URL         : <http://lists.osgeo.org/pipermail/lizmap-de/attachments/20220215/9a08ab2b/attachment-0001.bin>


Mehr Informationen über die Mailingliste Lizmap-de