I tried to install QGIS Server and QGIS Web Client on my Ubuntu machine by following this tutorial http://www.aboutgis.ro/blog/wp-content/uploads/2013/04/qgis_desk_web_server_client_tutorial.pdf.

At the end of the tutorial i should start the browser with localhost/qgis-web-client/site/index.html. But i get the error that the /qgis-web... was not found.

the localhost works.

does anybody nows what's wrong woth the tutorial i followed step by step after: --> install needed packages by entering in the terminal:


  • at the last step i copy the folder into /var/www/html/

  • now i can see the qgis-web-client/index.html but when i want to start the helloworld or the other map i get the following eror by firebug. ( TypeError: layerTree.root.firstChild is null )

  • it seems to me that the qgis server doesn't work correctly. I don't get any GetCapabilites request.

  • that's why i try to install qgis server from anitagraser http://anitagraser.com/2012/03/30/qgis-server-on-ubuntu-step-by-step/ but nothing changed because the files existing.

2 Answers 2


Assuming you have QGIS Server appropriately installed (with a working GetCapabilities request) on Ubuntu/Debian, the main steps involved on my end to get the QGIS Web Client up and running are as follows:

  1. Install python psycopg2, python-webob, git, libapache2-mod-wsgi using terminal: "sudo apt-get install python-psycopg2 python-webob git libapache2-mod-wsgi"
  2. Go to your home directory using terminal (let's say your home directory is "/home/johndoe"): "cd /home/johndoe"
  3. Download qgis web client onto home directory using terminal: "git clone https://github.com/qgis/qgis-web-client.git"
  4. For the "terminally-lazy", enter in terminal: "sudo ./install.sh ~/qgis-web-client/projects" or "sudo .install.sh /home/johndoe/qgis-web-client/projects"
  5. Open up a local browser and go to the URL: "qgis-web-client-localhost"
  6. The webpage that appears should have links to two local maps named "helloworld" and "naturalearth_110million", both of which should open successfully revealing maps if you click on either link.

For the qgis-web-client to work, you need a working GetCapabilities request. Now if I were you, I would redo the whole thing from the ground.

First I would install the server, I used the link: http://hub.qgis.org/projects/quantum-gis/wiki/qgis_server_tutorial (do all the steps until you get a working GetCapabilities request). If you get any problems at this part then please check the logs folder (error.log) to see whats wrong with your server (you might forgot to set some paths or ports).

When you have this request working you can move on to setting up Qgis-web-client. You clone it to some directory that suits you. Then open and read the file install.sh. In it you will see comments for the parameters you need to provide with the script. After understanding what you need to provide, you can simply run: sudo ./install.sh <path_to_projects> <par2> <par3> <par4>...

This script will install and set the paths correctly. After this you can try running the index.html. You can click one of the given examples to see if it displays correctly.

If it works, then you've successfully set the qgis-web-client. You can now simply add new (or custom) projects to your folder ~/qgis-web-client/projects/. Ofcourse for each project, you will need to edit the index.html and add the link to new project.

When I was setting the web client I've had some problems with a different error (Uncaught TypeError: Cannot read property 'abstract' of undefined) in the client which I fixed using this link: qgis-web-client stuck on Loading Map

I cannot confirm if it was fixed, but I'm giving you the link just in case you get the same problem.

  • any chance of a bit more explanation on paragraph 2 of your answer? This is where I get stuck... 'Building dependency tree Reading state information... Done E: Unable to locate package qgis-server'
    – washways
    May 8, 2015 at 17:19
  • @washways well it appears when you run the script, its not locating your qgis-server installation directory (it has this very important file: qgis_mapserv.fcgi). If you look at the script you can see that it searches in "/usr/lib/cgi-bin". Now change "/usr/lib/cgi-bin/" in the line if hash /usr/lib/cgi-bin/qgis_mapserv.fcgi 2>/dev/null; then accordingly and try again.
    – Piskr
    May 10, 2015 at 17:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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