1

I managed to get QGIS Server running locally on Windows10 using XAMPP, following this guide.

I clicked http://localhost/cgi-bin/qgis_mapserv.fcgi.exe?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities as the guide suggests, and got "Layer(s) not valid", but I figured that the server was working, since I wasn't getting a "not found" error of some sorts.

I then wanted to load my own map, but the guide doesn't really explain how to do it. After searching around on the internet, I tried: http://localhost/cgi-bin/qgis_mapserv.fcgi.exe?MAP=/OSGeo4W64/apps/qgis/bin/MAPNAME.qgs, but got a "Project file error".

What am I missing?

1 Answer 1

1

Try specifying the full path to your QGIS-project file "MAPNAME.qgs".

Change path http://localhost/cgi-bin/qgis_mapserv.fcgi.exe?MAP=/OSGeo4W64/apps/qgis/bin/MAPNAME.qgs
to
http://localhost/cgi-bin/qgis_mapserv.fcgi.exe?MAP=C:/OSGeo4W64/apps/qgis/bin/MAPNAME.qgs.

In my case, this worked and solved the problem.

The easiest way to check the functionality of your link (chain QGIS-Server - QGIS-project file) is in the browser by adding a request for project properties to it:
&SERVICE=WMS&REQUEST=GetProjectSettings

As an example http://localhost/cgi-bin/qgis_mapserv.fcgi.exe?MAP=C:/OSGeo4W64/apps/qgis/bin/MAPNAME.qgs&SERVICE=WMS&REQUEST=GetProjectSettings

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.