[Qgis-user] QGIS server : Serve Postgis data ?

Christoph Jung jagodki.cj at gmail.com
Tue Mar 28 11:59:04 PDT 2023


Hi,

Did you stored the username and password for connecting the Postgres-DB in an authentication configuration? And did you provide an environment variable with the path to a file containing the master password within? If not, please have a look into the really good and complete documentation about authentication in QGIS desktop and server:

https://docs.qgis.org/3.28/en/docs/user_manual/auth_system/auth_workflows.html#qgis-server-support

https://docs.qgis.org/3.28/en/docs/user_manual/auth_system/auth_overview.html#master-password

Best regards,
Christoph 

> Am 27.03.2023 um 18:09 schrieb celati Laurent via QGIS-User <qgis-user at lists.osgeo.org>:
> 
> 
> Good afternoon,
> Following to my previous message, I'm sharing my error. I am unable to serve a project containing postgis tables. For a first test, I'm just trying to serve one of the tables contained in my project. Here is the URL that I defined and tested. I tried to define max and min coordinates (BBOX) in the spatial reference system in 2154 (Lambert 93).
> 
>  http://SERVEUR/cgi-bin/qgis_mapserv.fcgi?MAP=/home/qgis/projects/cigeo_forages.qgs&LAYERS=Cigeo_Zios_Po&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&CRS=EPSG:2154&WIDTH=400&HEIGHT=200&BBOX=865347.7454,6820554.3899,886533.8979,6833234.8104
> 
> Please read below the error message : Internal Server Error
> 
> The server encountered an internal error or misconfiguration and was unable to complete your request.
> Please contact the server administrator at webmaster at localhost to inform them of the time this error occurred, and the actions you performed just before this error.
> More information about this error may be available in the server error log.
> If someone has any idea? To be complete, since the beginning of my tests, I have never had a log file generated in /var/log/qgis...This folder has been always remained empty
> Thanks a lot.
> 
>> Le lun. 27 mars 2023 à 11:48, celati Laurent <laurent.celati at gmail.com> a écrit :
>> Good morning,
>> I have just (finally) validated the installation of Qgis server on our Debian server.
>> I manage to serve/broadcast the .qgs project and the data made available by the community (world.qgs project). These are shp files.
>> In parallel with the installation of Lizmap or QWC2, I would like to test this time the fact to serve of qgis projects containing postgis tables from our database. How to do this ? Especially for the definition of the URL? How to define in the URL the sources of the postgis tables? The URL notably has a LAYERS&...
>> How for example to publish all the postgis tables contained in a project, without having to specify each of them in the URL?
>> Thank you so much.
> _______________________________________________
> QGIS-User mailing list
> QGIS-User at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20230328/210e3cfb/attachment-0001.htm>


More information about the QGIS-User mailing list