I am using the QGIS Server 3.4 docker image of CampToCamp from docker hub. I have shapefiles and TIFF files in a /home/gisserver/data/etc/gisserver folder, on a Ubuntu 18.04 machine. In the /home/gisserver/data/etc/gisserver is the project.qgs file with one shapefile layer.

To serve the layer with WMS, I set the following in the project properties, the minimum is checked, under "WMS Capabilties", the "Advertised extent", "CRS restrictions" are checked. In the "CRS restrictions" box, is EPSG:4326, and I used the "Use Current Canvas Extent" button to fill in the values for "Advertised extent".

I started the server in the /home/gisserver/data directory with the command specified on the docker page for QGIS server.

When requesting the capabilities http://localhost:8380/?SERVICE=WMS&REQUEST=GetCapabilities I get the following response

<ServerException>Layer(s) not valid</ServerException>

When removing the layer, and save the project empty, with no layers, I get a proper response. I have checked the layers CRS and the projects CRS is in sync, it is EPSG:4326. I also have set the QGIS_SERVER_LOG_LEVEL to 0, but can't get the logfile.

It looks like it should be located in the /var/log/apache2 directory in the docker container, but all the files in there have 0 byte sizes.

What am I missing?


After removing the containers and images for QGIS Server 3.4, and pull it fresh again, I got a "Project Error". When executing the command

docker logs conainer_name

I could see an error

06:32:14 CRITICAL Server[68]: Error when loading project file '/etc/qgisserver/project.qgs': Unable to open /etc/qgisserver/project.qgs in the log.

When looking at the rights on the file I could see that the "group" and "other" had no rights on the project file

-rw------- 1 1000 1000 32716 Feb 7 07:02 project.qgs

when adding read rights to "group" and "other" on the file

-rw-r--r-- 1 1000 1000 32716 Feb 7 07:02 project.qgs

I get the expected result when requesting the capabilities.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.