[GIS] QGIS Server does not display test WMS

configurationlinux-mintqgis-serverwms

I'm having a similar problem to this post: Using Qgis server with Ubuntu 12.04

I am using Mint 15 desktop and QGIS 2.0.1.

I read the above post and decided to go back a step or two and followed this tutorial: http://docs.qgis.org/2.0/html/en/docs/user_manual/working_with_ogc/ogc_server_support.html

I only got to the testing part. I am able to connect to localhost/cgi-bin/qgis_mapserv.fcgi using the 'Add WMS/WMST Layers' tool and I can see 'wfslayer' in the list. The 'Add' button is greyed out and the dialogue says Coordinate Reference System (0 available).

When I create my own QGIS project the 'Add' button is also greyed out unless I add the shapefile's CRS to Project Properties>'CRS Exclusions' list. If I add the CRS then I can add the layer to the TOC but it does not render.

I started to check if my web server (apache2) configuration was correct as per: http://karlinapp.ethz.ch/qgis_wms/configuration/index.html but am having the following issues:

  1. I have two fcgid.conf so do I edit both?
  2. I do not know the 'syntax' of 'DefaultInitEnv LD_LIBRARY_PATH' for apache2.conf or fcgid.conf
  3. I used /usr/lib/qgis for QGIS libraries (is this correct?) but cannot determine the path to 'qt libraries'.

Do I need to configure these 3 conf files?

Are they the likely cause of not being able to add the test WMS layer?

Best Answer

After much research and experimenting, including changing file permissions and removing relative file locations in the QGS file, I was unable to get qgis-server to serve a shapefile. I set up Postgis 2 and was successfully able to a serve a polygon layer. My conclusions are:

  • That qgis_mapserv.fcgi as per my configuration that uses QGIS 2.0.1 doesn't work with shapefiles.
  • The test WMS that is delivered with qgis_mapserv.fcgi is based on a shapefile and possibly why it doesn't work.
  • qgis-server works with postgresql 9.1 and postgis 2.0.3 on Mint 15 (which is based on Ubuntu 13.04).
  • The files fcgid.conf and apache.conf2 do not need configuring to test whether a map can be served using postgis.
  • Not configuring Project Properties>OWS Server in a qgis project doesn't stop a layer being served.