[Qgis-user] QGIS Web Client for Windows 7

Markus Weidenbach landconsult at freenet.de
Sun Mar 23 11:19:33 PDT 2014


Hi Andreas,

you are right, everybody who is using QGIS should feel a little bit 
committed to give sth. back to the community, so do I and that´s why I 
listed all steps I did to successfully run the QGIS Webclient under 
Windows 7 below.
I think you are more into the QGIS WebClient issue than I am, so maybe 
you (or any other from the list) can take the 14 steps, complete and/or 
revise them and publish it at a more prominent place (?)

_*Successful QG**IS Server and QGIS WebClient Installation on Windos 7 
as per 22.03.2014*_

That´s what I did in March 2014 to make it run on my Win 7 Prof 64bit 
system, using QGIS 2:

1. Install QGIS Server and Apache from OSGEO4W by using the WebGIS 
-Schnellinstallation (WebGIS-Fast-Installation) option, this will 
install Apache and QGIS Server with an almost complete setting and 
configuration.

2. If you whish you can have a look at Underdarks guidelines at 
http://anitagraser.com/2012/04/06/qgis-server-on-windows7-step-by-step/, 
but I think some steps have become obsolete with the WebGIS Fast 
Installation from OSGEO4W.

3. Delete (!) the .exe extension of 
C:\OSGeo4W\apps\qgis\bin\qgis_mapserv.fcgi.exe (new: 
C:\OSGeo4W\apps\qgis\bin\qgis_mapserv.fcgi).
This is needed because the QGIS WebClient which you will install later, 
can NOT address *.exe files, although the QGIS Server could ....

4. Test if the QGIS Server is working with a simple Map Request in your 
browser e.g.:
http://localhost/qgis/qgis_mapserv.fcgi?SERVICE=WMS&VERSION=1.3.0&SRS=EPSG:31467&REQUEST=GetMap&map=C:/path-to-a-simple-qgis-project.qgs&WIDTH=1000&HEIGHT=800&LAYERS=weg,bach&FORMAT=image/png 


5. If you get the map on the browser - or just an XML formatted 
information in case you just requested the GetCapabilities - then you 
successfully installed the QGIS Server and you can go on with 
downloading the QGIS WebClient ZIPFILE from GIT-Hub: 
https://github.com/qgis/QGIS-Web-Client

6. Unzip it to C:\OSGeo4W\apache\htdocs

7. The default setting in 
C:\OSGeo4W\apache\htdocs\QGIS-Web-Client-master\site\js\GlobalOtions.js
is correctly addressing the QGIS Mapserver File (without *exe extension, 
that you deleted before!):
It is using the variable /cgi-bin/, so it is:
var serverAndCGI = "/cgi-bin/qgis_mapserv.fcgi";
but physically the *.fcgi file is at C:\OSGeo4W\apps\qgis\bin (forget 
about 
C:\OSGeo4W\apache\htdocs\QGIS-Web-Client-master\cgi-bin\qgis_mapserv.fcgi, 
I think this works only for LInux users to make a certain demo map run 
...(?))

8. Change the default value in C:\OSGeo4W\apache\conf\httpd.conf file, 
at line 330 (approximately):
from
ScriptAlias /cgi-bin/ "C:\OSGeo4W/bin/"
to
ScriptAlias /cgi-bin/ "C:\OSGeo4W/apps/qgis/bin/"

9. Restart Apache every time you make changes to Apaches conf files

10. Start the default page of the QGIS Web Client at
http://localhost/QGIS-Web-Client-master/site/

11. Check that the links to the *.qgs files in
http://localhost/QGIS-Web-Client-master/site/index.html
are correct (maybe the best is to start with entering an absolute path 
for the *.qgs files, e.g. <a 
href="qgiswebclient.html?map=C:/OSGeo4W/apache/htdocs/QGIS-Web-Client-master/projects/helloworld.qgs">

12. Clicking on that link above will open the QGIS Web Client Interface 
and load the demo map "hello world"

13. To make the "Search Function" and the "Map Theme" running, some more 
configuration is needed at the moment (that´s what I still have to do), 
so ....

14.  ... if problems arise, please check:
http://gis.stackexchange.com/feeds/tag/qgis-web-client where you find 
new FAQ dealing with the QGIS WebClient.

Have fun!

Markus

-- 
Dr. Markus Weidenbach
*landConsult.de*
Geographical Information Management
and Environmental Planning
D-77815 Bühl
Germany
e.mail see: http://landConsult.de


Am 17.03.2014 09:45, schrieb Andreas Neumann:
> Hi,
>
> I am just very briefly following this thread. It would be great if the
> Windows users of QGIS server and web client could complete the
> documentation.
>
> There are many more Windows users running into problems with the
> configuration of QGIS server and web client than Linux users.
> Eventually, people are getting there but then don't take the time to
> correct/complete a proper documentation. This is a community-driven
> project - so everybody has some reponsibility ...
>
> Thanks and good luck with the configuration,
> Andreas
>
> Am 17.03.2014 07:55, schrieb Bernhard Ströbl:
>> Hi Markus,
>>
>> Am 14.03.2014 12:37, schrieb Markus Weidenbach:
>>> Hi Bernhard,
>>>
>>> that´s the point ... *my QGIS Server is running*, please test following
>>> link without QWC:
>>> http://landconsult.no-ip.com/qgis/qgis_mapserv.fcgi.exe?SERVICE=WMS&VERSION=1.3.0&SRS=EPSG:31467&REQUEST=GetMap&map=C:/OSGeo4W/apache/htdocs/QGIS-Web-Client-master/projects/wms_demo.qgs&BBOX=3453493.9,5358354.8,3461626.4,5363507.8&WIDTH=1000&HEIGHT=800&LAYERS=weg,bach&FORMAT=image/png
>>>
>>>
>>> In your link, you missed the *.exe extension in qgis_mapserv.fcgi ....
>>> but when running it in QWC the *.qgi is not loading, test following:
>>> http://landconsult.no-ip.com/QGIS-Web-Client-master/site/qgiswebclient.html?map=C:/OSGeo4W/apache/htdocs/QGIS-Web-Client-master/projects/wms_demo.qgs
>>>
>> I missed the .exe because it is not called by QWC!
>> As I wrote: use firebfox with firebug and you'll see that QWC fails as
>> follows:
>> "NetworkError: 404 Not Found -
>> http://landconsult.no-ip.com/cgi-bin/qgis_mapserv.fcgi?map=C:/OSGeo4W/apache/htdocs/QGIS-Web-Client-master/projects/wms_demo.qgs&&_dc=1395042577212&SERVICE=WMS&VERSION=1.3&REQUEST=GetProjectSettings"
>>
>>
>> So you misconfigured the path to your fcgi. In GlobalOptions.js line 13
>> reads:
>> var serverAndCGI = "/cgi-bin/qgis_mapserv.fcgi";
>>
>> Bernhard
>>
>>>> OK, now I can access it. Use firebug in firefox to see what happens.
>>>> If you do that you will realize that the error is that
>>>> cgi-bin/qgis_mapsserv.fcgi is not accessible.
>>>> http://landconsult.no-ip.com/cgi-bin/qgis_mapserv.fcgi?map=../projects/helloworld.qgs&&_dc=1394795203156&SERVICE=WMS&VERSION=1.3&REQUEST=GetProjectSettings
>>>>
>>>>
>>>>
>>>> so first thing to do is to get your QGIS server running.
>>>> GetProjectSettings or GetCapabilities must return something sensible.
>>>> You can check this in your browser (or QGIS desktop). As soon as a
>>>> GetMap request is successful (check this e.g. in QGIS desktop) you can
>>>> start configuring QWC.
>>> Markus
>>>
>>>
>>
>> __________ Information from ESET Security, version of virus signature
>> database 9549 (20140316) __________
>>
>> The message was checked by ESET Security.
>>
>>     part000.txt - is OK
>>
>> http://www.eset.com
>>
>>
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-user
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20140323/30081b05/attachment.html>


More information about the Qgis-user mailing list