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

Strange long URL suffix starting with ?map=... while browsing the WFS3 web pages of the project #75

Open
swiss-knight opened this issue Feb 5, 2022 · 1 comment

Comments

@swiss-knight
Copy link

Hello,

I had to rewrite the line 88 of nginx-fcgi-sample.conf

from this:

rewrite ^/ogc/(.*)$ /qgis/qgis_mapserv.fcgi?map=/io/data/$1/$1.qgs;

to this:

rewrite ^/ogc/(.*)$ /qgis/qgis_mapserv.fcgi;

In order to be able to see correctly formatted hyperlinks when browser QGIS server web pages.

E.g. at:
http://127.0.0.1:8010/ogc/myproject-folder/wfs3/collections/{collectionId}/items/
clicking a feature will open it at this URL (which is the expected behaviour):
http://127.0.0.1:8010/ogc/myproject-folder/wfs3/collections/{collectionId}/items/{itemId}.html

Because with the current version of the nginx config file, it opens as follows:
http://127.0.0.1:8010/ogc/myproject-folder/wfs3/collections/{collectionId}/items/{itemId}?map=/io/data/myproject-folder/wfs3/collections/{collectionId}/items//myproject-folder/wfs3/collections/{collectionId}/items/.qgs

image

The feature is correctly displayed in the browser, that's not the problem, but the URL is quite messy as you can see, and each and every hyperlink on the QGIS server pages, is suffering a similar very long ?map=... suffix.

I'm wondering if I missed something in the configuration?

Please note that my QGIS project file is located, within the container, in this folder:

root@qgisserver:~# ls -lh /io/data/myproject-folder/
total 21M
-rw-rw-r-- 1 1000 1000 21M Feb  5 08:32 myproject-file.qgs

and that I had to add this env var to the Compose file:

QGIS_PROJECT_FILE: "/io/data/myproject-folder/myproject-file.qgs"

Without the QGIS_PROJECT_FILE var, I'm facing an empty Collections page with this error:

qgisserver_1  | 11:27:06 CRITICAL Server[14]: Error when loading project file '/io/data/myproject-folder/wfs3/collections/myproject-folder/wfs3/collections.qgs': Unable to open /io/data/myproject-folder/wfs3/collections/myproject-folder/wfs3/collections.qgs 
qgisserver_1  | 11:27:06 CRITICAL Server[14]: Error when loading project file '/io/data/myproject-folder/wfs3/static/style.css/myproject-folder/wfs3/static/style.css.qgs': Unable to open /io/data/myproject-folder/wfs3/static/style.css/myproject-folder/wfs3/static/style.css.qgs 
qgisserver_1  | 11:27:06 CRITICAL Server[14]: Error when loading project file '/io/data/myproject-folder/wfs3/static/jsonFormatter/jsonFormatter.min.css/myproject-folder/wfs3/static/jsonFormatter/jsonFormatter.min.css.qgs': Unable to open /io/data/myproject-folder/wfs3/static/jsonFormatter/jsonFormatter.min.css/myproject-folder/wfs3/static/jsonFormatter/jsonFormatter.min.css.qgs 
qgisserver_1  | 11:27:06 CRITICAL Server[14]: Error when loading project file '/io/data/myproject-folder/wfs3/static/jsonFormatter/jsonFormatter.min.js/myproject-folder/wfs3/static/jsonFormatter/jsonFormatter.min.js.qgs': Unable to open /io/data/myproject-folder/wfs3/static/jsonFormatter/jsonFormatter.min.js/myproject-folder/wfs3/static/jsonFormatter/jsonFormatter.min.js.qgs 
@swiss-knight swiss-knight changed the title Strange long URL suffix starting with ?map=... while browser the WFS3 web pages of the project Strange long URL suffix starting with ?map=... while browsing the WFS3 web pages of the project Feb 5, 2022
@mbernasocchi
Copy link
Member

@daniviga what do you think?

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