Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

share|improve this question
    
While I respect this is not an answer (I can't add a comment because I don't enough points) I am having the same issue (see: gis.stackexchange.com/questions/72013/…). Giovanni suggested above "check that is working with the url localhost/cgi-bin/qgis_mapserv.fcgi". I found that when I checked this using QGIS to load the WMS test layer that is part of qgis_mapserv.fcgi that I couldn't. Was this your experience user8083? –  Colin Sep 20 '13 at 6:10

1 Answer 1

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)

share|improve this answer
    
Thanks for your answer Giovanni. I have it installed using synaptic and the server exe was placed in /usr/lib/cgi-bin/. I checked if it was working with url localhost (returned "It works!"). I created a qgis project and placed it in a folder in cgi-bin called project. Used add WMS layer in qgis desktop and the layer is listed & can be added to the TOC but isn't rendered? I used absolute paths in project properties. Thanks for reading guys. –  user8083 Aug 29 '12 at 9:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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