[GIS] Using Qgis server with Ubuntu 12.04

qgisserver

I realise there had been many posts on this subject but unfortunately I need to post again.

I've been banging my head against this all day. I'm trying to get qgis server working with Ubuntu 12.04 with no luck.

I'm using Qgis 1.8 lisbora

I used Synaptic package Manager to install all the necessary packages.

Apache2 web server is running ok tested using [http://localhost/]
returned "It Works!"

Created a folder in /usr/lib/cgi-bin/ called project and copied qgis_mapserv.fcgi and wms_metadata.xml files into the project folder.
/usr/lib/cgi-bin/
Created a .qgs project in desktop Qgis 1.8 and saved it directly to /usr/lib/cgi-bin/project

Checked capabilities using: [http://localhost/cgi-bin/project/qgis_mapserv.fcgi?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities] in a browser url address bar.

Get Capabilities shows the right CRS and the vector layer name but zero values for the bounding box and zero values for the lat/long bounding values.

I've used absolute paths for the .qgs project file, changed the permissions for both the project file and the folder. I've also checked the path to the data files in the .qgs project file and it looks correct.

I also removed the # at the first line of the httpd file.

I think this is a problem with the bounding box and the lat/long bounding values. This was set in project properties dialogue box under >OWServer>Advertised extent> Use Current Canvas Extent.

I'm at a loss as to what to do next.

Any help would be greatly appreciated.

Regards

Best Answer

Make QGIS server work under (Ubuntu) Linux is really simple:

  • install it from apt/aptitude/synaptic

  • the server executable will be placed into /usr/lib/cgi-bin/ no need to copy/move files around

  • check that is working with the url localhost/cgi-bin/qgis_mapserv.fcgi

  • create a QGIS project, be sure you are using absolute paths in project properties (just to be sure as this way it will certainly work, in production this would probably need to be set to relative paths) and again in project properties configure what you find in the "ows server" tab -> especially the list of available CRSs and the vectors you may want to serve as WFS layers

  • test your WMS/WFS server with localhost/cgi-bin/qgis_mapserv.fcgi?map=/path/to/your/project.qgs

  • (forget about the xml file, is no needed anymore)

Related Question