2

I'm currently working on a WMS with QGIS 1.8.0 Desktop with Apache from xampp. What I want to do is to have my .qgs file displayed on my web page as a OpenLayers. So I followed this tutorial:

http://hub.qgis.org/projects/quantum-gis/wiki/QGIS_Server_Tutorial#Webserver-configuration

I think the server is working correctly since I'm not having any errors when I run:

http://localhost/qgis/qgis_mapserv.fcgi.exe?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities&map=c:/mymaps/welt.qgs 

It returns a XML file. Yet something weird is in there, there are lots of tags like:

<Layer queryable="1">
<Name>welt</Name>
<Title>welt</Title>
<CRS>EPSG:32062</CRS>
<CRS>EPSG:32061</CRS>
<CRS>EPSG:32058</CRS>
<CRS>EPSG:32057</CRS>
<CRS>EPSG:32056</CRS>

And so on. I think there are about 10k lines of it. So I think there is a problem with the .qgs file instead of server configuration issues. Yet I'm new to QGIS and it's features.

And when I want to try the:

http://localhost/qgis/qgis_mapserv.fcgi.exe?SERVICE=WMS&VERSION=1.3.0&SRS=EPSG:4326&REQUEST=GetMap&map=c:/myprojects/world.qgs&BBOX=-36.215710,6.817432,-9.700450,58.551008&WIDTH=500&HEIGHT=1000&LAYERS=world_countries&FORMAT=image/png

URL it just gives me a white box within a black frame. (I changed the &map and &layers parameter)

EDIT:

Just had this brilliant idea to test it on the osgeo-apache apache server and it worked. So I checked the httpd.conf of both osgeo-apache and xampp and had to change the

    #
    # Controls who can get stuff from this server.
    #
    Require all granted

to

    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all

and it works smooth now.

  • There is nothing weird with a GetCapabilities request returning XML, that's what's meant to happen. – nmtoken Aug 8 '17 at 5:59
2

Okay so I've found the configuration error. It seems that the xampp apache doesn't allow to get any stuff from the server so changing this line in your httpd.conf will solve the problem.

#
# Controls who can get stuff from this server.
#
Require all granted

to

#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all

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.