Is there a simple example/tutorial of how to set up QGIS Server with the latest QGIS version on Ubuntu, I can't get a correct result (blank image)? I think there might be some problem with my FASTCGI config on apache.

Please help me. Thanks.

  • Which Ubuntu version are you using. Some issues installing on 11.04 were reported: lists.osgeo.org/pipermail/qgis-user/2011-May/012063.html – underdark Jun 9 '11 at 7:11
  • iam using 10.04 – venkat Jun 10 '11 at 4:53
  • I did follow all the tutorials mentioned above, but I can not get qgis server work on Ubuntu lucid. I can correctly visualize the capabilities and can see also the legends correctly but the getMap request returns a blank jpg or png. Any help? – bradypus Dec 9 '11 at 19:09

I have it working on Ubuntu 10.04/10.10 and 11.04. My first tutorial was this

http://linfiniti.com/2010/08/qgis-mapserver-a-wms-server-for-the-masses/ (broken link)

but under Ubuntu (with all installed from repos) is even easier.

Enter the cgi-bin folder, create a project folder, copy in there the project file and a copy of qgis_mapserv.fcgi, then add a metadata file.

The qgis project MUST be saved with absolute paths (for layers).

  • i have done it seeing the same link two days ago. but i got a white blank image instead of map even when localhost/cgi-bin/world/… this is working, wat do you mean by paths for layers? – venkat Jun 10 '11 at 5:07
  • yes, path for layers. Where you get blank images? in the desktop gis? in the browser? – Giovanni Manghi Jun 10 '11 at 8:37
  • i got blank images in firefox browser. where do i specify paths for the layers? – venkat Jun 10 '11 at 9:02
  • in the project properties, general tab, "save paths" option. – Giovanni Manghi Jun 10 '11 at 9:22
  • wat about the blank images? – venkat Jun 10 '11 at 9:35

QGIS Server main documentation is located at: http://www.qgis.org/wiki/QGIS_Server_Tutorial

Quoting the Wiki section for Ubuntu:

To setup QGIS Server with Apache 2 mod_fastcgi, the following packages are required: apt-get install qgis-mapserver libapache2-mod-fcgid

Note that libapache2-mod-fcgid and libapache2-mod-fastcgi are different packages and require different configurations.

Using the default configuration, QGIS Server should answer a GetCapabilities request from here:



I installed qgis and qgis_server using this tutorial: http://underdark.wordpress.com/2012/03/30/qgis-server-on-ubuntu-step-by-step/


  • Ubuntu 12.04.O
  • Virtual Machine

    1. In "/usr/lib/cgi-bin/" create a folder called "test" ."test" is where you will save your qgis project and .shp too. Inside this folder you must copy the file qgis_mapserv.fcgi and the wms_metadata.xml too.
    2. Open a .shp file in qgis and save it as a project in "/usr/lib/cgi-bin/test/". Let's suppose you project name is "demo.qgis"
    3. Now in project properties define your src as Google Mercator and in layer properties define your layer name and save it.
    4. After that, close you project and create a new one.
    5. In the new blank project , add a WMS layer and add the name and the url of your project name.

Example (step 5):

      Name: Rivers

and then accept and voila...

protected by underdark Aug 7 '14 at 9:57

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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