Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WMS GetCapabilities does not work and prevents from accessing QGis Server from the desktop application #343

Open
asitemade4u opened this issue May 13, 2022 · 3 comments

Comments

@asitemade4u
Copy link

asitemade4u commented May 13, 2022

Hi and thank you for this working docker version of the QGis Server.
Everything went fine with the deployment but for some reason I am unable to get the capabilities of the server, which has a lot of downstream consequences.
The error I get when I do http://g11.qtpl.net:8380/?SERVICE=WMS&REQUEST=GetCapabilities (I only use the server within my local network, so I am sure no firewall is the culprit) is:

<ServerException>
Project file error. For OWS services: please provide a SERVICE and a MAP parameter pointing to a valid QGIS project file
</ServerException>

Which does not really make sense as I am checking the capabilities of the server here.

Please help.
Stephen

@Kanahiro
Copy link

Kanahiro commented May 14, 2022

I was able to workaround by setting env QGIS_SERVER_LANDING_PAGE_PROJECTS_DIRECTORIES.

docker run --detach --publish=8380:80 -e QGIS_SERVER_LANDING_PAGE_PROJECTS_DIRECTORIES=/etc/qgisserver --volume=$PWD/etc/qgisserver:/etc/qgisserver camptocamp/qgis-server

I'm not sure why that env have become to be needed but seem to be needed since v3.16.
https://api.qgis.org/api/classQgsServerSettingsEnv.html

It would be good to update documentation.

@Kanahiro
Copy link

Sorry above description is not enough for your question.
In my case http://localhost:8380/?SERVICE=WMS&REQUEST=GetCapabilities is also unavailable.
First you can access to http://localhost:8300 and projects will be shown.

GetCapabilities URL of my project is http://localhost/project/e35a7832bd9de050f9da2e2c29af6620/?SERVICE=WMS&REQUEST=GetCapabilities. Unique-Id may be assigned automatically.

@asitemade4u
Copy link
Author

asitemade4u commented May 16, 2022

Hi @Kanahiro , thanks for your quick response!
Obviously we are in limbo with differing versions of QGis Server and the docker stack -- as it seems, the documentation of QGis is ahead of the real procuduct capabilities an that is not the responsibility of camptocamp, obviously, but of QGis...
In the API documentation for QGis server v2.24 (which is the one published in camptocamp's docker image), they mention: QGIS_SERVER_WMS_SERVICE_URL which is probably what we need here.
Instead, we are dealing with silly shortcuts and have to define a single default project (using QGIS_PROJECT_FILE) when we should be able to define the ProjectCapabilities otherwise.

(As you might understand, I am very upset with the way QGis deal with the documentation)...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants