2

I installed QGIS Server via yumex on my CentOS 7.1 System and I have an Apache 2.4.6 Server running.

My Problem is, I can't show a QGIS project in my Chrome browser. Of cause, I read many instructions how to install QGIS Server and test it, but none of these worked for me.

My directories look like this:

Apache:

/var/www/cgi-bin/

/var/www/html/

/etc/httpd/conf/httpd.conf

QGIS:

/usr/bin/qgis

/usr/libexec/qgis/qgis_mapserv.fcgi

/usr/share/doc/qgis-server-2.8.2/wms_metadata.xml

I put a .qgs file in /var/www/html/wms/ where also are symlinks to qgis_mapserv.fcgi and wms_metadata.xml.

When I try to open my project via http://localhost/wms/My_project?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.3.0 I got an Error:

This XML file does not appear to have any style information associated with it. The document tree is shown below.

<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" version="1.3.0"> <ServiceException code="WMS configuration error"> There was an error reading the project file or the SLD configuration </ServiceException> </ServiceExceptionReport>

  • I have noticed that QGIS Server was already running. That was for fem not clear to see. From the documentation I didn't know what to expect from my calls to the server. – zalf Aug 17 '15 at 8:43
  • see: gis.stackexchange.com/questions/159431/… – zalf Sep 16 '15 at 15:37
1

Probably, there is a problem from Apache to access the directory

/var/www/html/wms

I had the same error with myproject.qgs that was in a different directory:

/var/www/wms


The problem has been solved with insert of some directives in this configuration file:
/etc/httpd/conf.d/qgis-server.conf

RewriteRule ^/wms/(.+)$ /qgis/qgis_mapserv.fcgi?map=/var/www/wms/$1.qgs [QSA,PT]

Alias /wms/ "/var/www/wms"

<Directory "/var/wwww/wms">
    AllowOverride None
    Options None
    Require all granted
</Directory>

# This configuration is intended as an example. 
# It is not meant for productive use
  • On Ubuntu 16.04 with QGis-Server 2.14 this file does not exist. Where else could these directives be added? – Luís de Sousa Sep 30 '16 at 8:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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