As you can see here, I was able to build a QGIS Server following this tuto. I've done that on my Raspberry Pi4, on Rasbian.

I create a test folder, and as you can see the "GetCapabilities" seems to work!

So now, I try to connect in QGIS, trough this WMS with the same URL as above. I can see the 2 layers: enter image description here

But when I load them, I have the correct legend, but all the layers seems to be blank.

enter image description here

To be complete, my "test" folder contains the .qgs file and the data in a .gpkg file. I don't know if it is important, but my Raspberry (so my QGIS server) is behind a reverse proxy!

Do you have a idea why the WMS is only "blank"?

[EDIT] It's even stranger... With the demo project, I can see only the "places" layer. And I can't change the CRS! enter image description here

  • Perfectly possible to have a GetCapabilities response and no data display. It just gives metadata information about the service, like what you've called the layers, what CRS the service supports, what operations, what formats etc. you can have all that and mess up the configuration so nothing shows.
    – nmtoken
    Jun 28 '21 at 15:53
  • Legend but no data showing is more interesting, but scale layering, wrong data extent could perhaps do it
    – nmtoken
    Jun 28 '21 at 15:54
  • Did you choose the root layer (0) or the individual layers independently?. Also what if you select png, rather than jpeg?
    – nmtoken
    Jun 28 '21 at 16:00

Suggestions to debug:

  • Version of your QGIS on the server and on the local machine do match or not? If not, what are the versions? Not to problematic if both versions = 3.x, issue may arise if 2.x on one side and 3.x on the other
  • Did you validate your QGIS project using "Test Configuration" (screenshot)? Having a working QGIS Desktop project does not warranty it's OK to publish on QGIS Server

enter image description here

  • Try an existing working QGIS Server project to sort out if issue in your server config or your QGIS project. To do so,

    • get https://github.com/qgis/QGIS-Training-Data/archive/refs/heads/master.zip.
    • uncompress
    • copy directory qgis-server-tutorial-data (within exercise_data folder) to your server. In your case, it could be in /home/pi/QGIS/qgis-server-tutorial-data
    • try to consume in a new QGIS project this particular QGIS Server project declaring it as a new QGIS WMS service with URL http://maps.antoinestocker.ch/cgi-bin/qgis_mapserv.fcgi?MAP=/home/pi/QGIS/qgis-server-tutorial-data/world3.qgs and try to add a layer from it. You can also compare the third party QGIS server project to your own to understand where differences may break the "right" behaviour.

    If it works with this other project, the issue is in your own QGIS project, otherwise, it's related to your server.

Among the issues your project can have, except the QGIS Server project validity, you can have layer(s) that do not have explicit projection declared (so reprojection when calling WMS does not happen well)

  • I think I have problem with version! Qgis server is 2.18 and Qgis is 3.16!
    – katagena
    Jun 27 '21 at 16:48
  • In this case, maps.antoinestocker.ch/cgi-bin/qgis_mapserv.fcgi?MAP=/home/pi/… should work (demo project for QGIS 2.x) File name is world.qgs instead of world3.qgs. Will not solve issue in your own project unfortunately...
    – ThomasG77
    Jun 27 '21 at 16:50
  • Strange... I still have nothing except a blank image!?! How it's possible to have the "Getcapabilities" and the legend, but not the "data"!?!
    – katagena
    Jun 28 '21 at 7:39
  • Also in your own project in which data source are you storing your layers content e.g PostGIS, shp, GPKG,..?
    – ThomasG77
    Jun 28 '21 at 9:33
  • Are you able to display an image with the QGIS training manual QGIS project content using QGIS to consume it?
    – ThomasG77
    Jun 28 '21 at 9:34

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.