[Qgis-user] QGIS Server setup <-- PostgreSQL/PostGIS

Sebastián Meyer sebastian at indomitux.com
Sat Feb 8 13:56:59 PST 2025


Hi,

I'm working on setting up a QGIS server which should retrieve projects 
and their layers from a PostgreSQL PostGIS enabled database, but I can't 
find (or I'm not understanding) how to do it.

I've tried passing QGIS_PG_CONNECTION and QGIS_PROJECT_STORAGE variables 
through Apache without success (error codes 500 381)

#My browser

This XML file does not appear to have any style information associated 
with it. The document tree is shown below.
<ServerException>Project file error. For OWS services: please provide a 
SERVICE and a MAP parameter pointing to a valid QGIS project 
file</ServerException>


What am I missing?

For storing projects I'm using 'qgis_metadata' schema with a 
'qgis_projects' table. For projects' layers, I'm grouping them in 
different schemas.


#Apache webserver config

SetEnv QGIS_PG_CONNECTION 
"postgresql://user:pass@qgis.server:7000/proyectos_qgis"
SetEnv QGIS_PROJECT_STORAGE 
"postgresql://user:pass@qgis.server:7000/proyectos_qgis?qgis_metadata.qgis_projects"


I've tested database access.


--

seb



More information about the QGIS-User mailing list