2

I just installed QGIS server using the instructions provided here. I am pretty sure that I have installed QGIS properly, but I am not sure. I am using Windows 7, and XAMPP. I typed the following into my browser:

http://localhost:8081/qgis/qgis_mapserv.fcgi.exe?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities&

And I get a page that begins like this:

<WMS_Capabilities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opengis.net/wms" version="1.3.0" xsi:schemaLocation="http://www.opengis.net/wms http://qgis.org/wms_1_3_0.xsd">
<Service>
<Name>WMS</Name>
<!--  Human-readable title for pick lists  -->
<Title>QGIS mapserver</Title>
<!--
 Narrative description providing additional information 
-->
<Abstract>A WMS service with QGIS mapserver</Abstract>
<KeywordList>
<Keyword>QGIS mapserver</Keyword>
</KeywordList>
<!--
 Top-level web address of service or service provider. 
 See also OnlineResource elements under <DCPType>. 
-->
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://www.sourcepole.ch/"/>
<!--  Contact information  -->

I am pretty sure this is what I am supposed to get, so I assumed that what I was doing was correct. After that, I placed a QGIS file in C:\OSGeo4W\apps\qgis\bin and tried to view this by putting:

http://www.localhost:8801/qgis/qgis_mapserv.fcgi.exe?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities&map=C:/OSGeo4W/apps/qgis/bin/LakeCountyBlight.qgs&

in my browser.

I wasn't sure if that was what I was supposed to do, so I went into QGIS > vector > add WMS/WMTS > new > URL > localhost:8801/qgis/qgis_mapserv.fcgi.exe?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities&map=C:/OSGeo4W/apps/qgis/bin/LakeCountyBlight.qgs

When I did that, I got the error message:

Failed to download capabilities:
Download of capabilities failed: Host www.localhost not found

I'm not sure why nothing is happening. One thing that might be a problem is that my computer has both IIS, and Apache on it. I set IIS and Apache to different ports by going into the httpd.conf files. However, I also had to change the httpd.conf file for QGIS server to something different for Xampp to get it to work. I was wondering if that was the problem, and if so, how would I fix it?

4
  • Why are you prefixing the web address with www? Your server address is localhost. Commented Oct 2, 2014 at 23:18
  • I tried doing it both ways, just to see if maybe adding the webaddress would change. I got the same results both ways.
    – Ravi Mehta
    Commented Oct 2, 2014 at 23:55
  • Please edit your question according to @drunkenwagoner remark. Commented Oct 3, 2014 at 7:55
  • 1
    I think I solved the problem. I was running QGIS server from one drive, and had the documents saved in another drive, which seemed the computer then could not find. After moving the .qgs file to the C drive, I could get a capabilities-XML like I was supposed to.
    – Ravi Mehta
    Commented Oct 3, 2014 at 14:21

1 Answer 1

2

I placed a QGIS file in C:\OSGeo4W\apps\qgis\bin and tried to view this by putting:

http://www.localhost:8801/qgis/qgis_mapserv.fcgi.exe?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities&map=C:/OSGeo4W/apps/qgis/bin/LakeCountyBlight.qgs&

You can't view any data by doing a GetCapabilities request on it. If everything is configured correctly then you should get an XML response for the service that includes information about the data held in LakeCountyBlight.qgs.

However, as per your error, your request is incorrect because you have http://www.localhost:8801 it should be http://localhost:8801, that is without the www.

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.