3liz / docker-qgis-server

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

No Capabilities / SERVICE NON DISPONIBLE #2

Closed ghost closed 5 years ago

ghost commented 5 years ago

Hi,

I'd like to try out the server image, but I can't seem to get a working response and in the Lizmap Web Client, the "SERVICE NON DISPONIBLE" message appears. The qgis server is started and the "GET /?MAP=xxx.qgs&REQUEST=GetCapabilities&SERVICE=WMS" request received, but the response is only a JSON with some information on the server config, not a Capabilities document.

Could this have to do with the .qgs files containing Postgres service definitions and the QGIS Server not knowing how to handle them? In that case: how can I pass the PGSERVICEFILE env to the server? Setting it as a docker env doesn't seem to work.

Cheers, Tobias

dmarteau commented 5 years ago

Hi Tobias,

You must add an /ows/ path to your uri: /ows/?MAP=xxx.qgs&REQUEST=GetCapabilities&SERVICE=WMS

For use with lizmap must configure Lizmap to use that uri in your lizmapConfig.ini.php:

[services]
wmsServerURL="http://my.domain:<port>/ows/"
...

; Use relative path
relativeWMSPath=true

I'm going to update the doc...

About the PGSERVICEFILE: you must set the env to a location that can be accessed from the container:

1) Mount the path to the pg service file location 2) Set the the PGSERVICEFILE env to the location in the container

Cheers, David

ghost commented 5 years ago

Hi David,

thanks for the quick reply - it's working now! I think in LWC, you also have to set the "root folder of repositories".

Cheers Tobias