[GIS] QGIS Server on Windows7 Step-by-step / Test wms by adding in QGIS

qgisqgis-serverwindows 7wms

I am trying to Test a WMS by adding in QGIS as per http://anitagraser.com/2012/04/06/qgis-server-on-windows7-step-by-step/

If I follow the steps, QGIS cannot find the server.

When I take a look at the printscreen above, I see that there is QGIS.exe in the c://OSGeo4w/apps/qgis/bin –map.

Is this necessary? When does this get done?

Best Answer

If you installed the packages correctly you now need to decide what web server you want to use for your QGIS server. Windows has its own IIS, but I'm guessing you're using the provided apache. First of all you need to theck if that qgis_mapserv.fcgi.exe is even working (the .exe file is used to respond to your requests). You can simply go to that folder hold shift and right click to open command window. In the command window just tpye qgis_m and press tab, it should finish off your filename and press enter to run the exe. If everything mostly works, you should get some warnings. But if you get a error that you have a dll missing, you have to copy them from the c://OSGeo4w/apache/bin folder to the c://OSGeo4w/apps/qgis/bin –map. Like Anita mentioned in her tutorial these 2 files are missing libeay32.dll and ssleay32.dll. After you copied these 2 files try running the .exe in your cmd. If you only get warnings about ECW and JP2ECW then you're good to go, if you still get .dll errors find the appropriate ones in c://OSGeo4w/apache/bin.

Once your qgis_mapserv.fcgi.exe works you can move on to setting your apache server. All you have to do in c:/osgeo4w/apache/conf/httpd.conf is change

Listen @apache_port_number@

to our needs, e.g. to listen on port 80

Listen 80

After this restart apache and try a simple url to see if your server is up and running http://localhost/qgis/qgis_mapserv.fcgi.exe?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities

If this works you can continue on working with Anitas tutorial.

If you want to use IIS, leave a comment below and I'll write how to set it up in that web server.