3liz / docker-qgis-server

Build docker qgis tornado server image
6 stars 1 forks source link

Failure to run the image and accessing ows services #7

Closed NyakudyaA closed 5 years ago

NyakudyaA commented 5 years ago

Problem

I have been trying to use this image to serve out my qgis projects but have largely been unsuccessful. Maybe I am doing a schoolboy error.

I ran

docker run -p 8080:8080 \
       -v `pwd`projects-qgis3:/projects \
       -e QGSRV_SERVER_WORKERS=2 \
       -e QGSRV_LOGGING_LEVEL=DEBUG  \
       -e QGSRV_CACHE_ROOTDIR=/projects \
       -e QGSRV_CACHE_SIZE=10 \
       3liz/qgis-map-server:3.6

where the contets of projects-qgis3 directory looks like contents

And when I run the http://localhost:8080/ows/?SERVICE=WMS&VERSION=1.1.0&REQUEST=GetCapabilities I get the following error. get

If I add the map parameter to the request I get the following error. map-request

But If I exec into the container I can see that the project.qgs does exist in /projects/

data-cont

But If I use my qgis project with another image it works without any problem ie run

Which results in the following request get-req

So I am quite sure the qgis project has no errors but I am puzzled to what I am doing wrong here

dmarteau commented 5 years ago

Your MAP path is incorrect: path must be relative to the QGSRV_CACHE_ROOTDIR i.e:

?MAP=project.qgs&...

not

?MAP=/project/project.qgs&...

Absolute project paths are forbidden because this is a security hole.

NyakudyaA commented 5 years ago

Thanks will try it out

NyakudyaA commented 5 years ago

Works