I am trying to publish a WMS via QGIS using QGIS Server. It works when the data for the QGIS project are shapefiles that I put in the same folder as the project on the QGIS Server (/usr/lib/cgi-bin/qgis-server/projectfolder).
Now I have data that are stored in a PostGIS database. When trying to load the WMS in OpenLayers it doesn´t load the requested WMS layer. I assume that the problem is that it fails to connect to the database since the password is not stored anywhere. I stored the connection to the database in QGIS Desktop but it looks like this information is not passed to the Server.
I am using:
QGIS-Version: 2.14.8-Essen Apache-Version: 2.4.7 PostgreSQL-Version: 9.3.16 PostGIS: 2.1.2 r12389