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


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

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:

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

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.