You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't figure out how the URLs inside the responses (e.g. WFS3 JSON response or the WMS GetCapabilities) get their hostname.
I have a scenario where the container runs with its built in NGINX. In addition, I have another application in front of the QGIS Server, which has its own proxy mechanism through with I expose the container. So to get a response from e.g. the WFS3 endpoint, I can reach it at:
But the response contains references to container's internal endpoint:
Furthermore, I have no idea where the hostname ofhttps://qgis-server:443 comes from as my docker-compose.yaml looks like this:
services:
qgis-server:
image: 'opengisch/qgis-server:ltr-jammy'# We want the latest LTR based on Ubuntu 22.04hostname: hstd_qgisservercontainer_name: qgis-server-hstd
What I try to do
I would like my responses from the OGC services (whether it's the already mentioned WFS3 or e.g. WMS with its XML responses) to contain the URL to my proxy (https://hajkmap.example.com/api/v1/proxy/qgisserver) instead of the current value (https://qgis-server:443).
NB: I can't do this using the QGIS project file's "Announced URL" function because the address of the proxy will vary, depending on the node running the container (it could be at https://production-server.example.com/api/v1/proxy/qgisserver as well as https://internal-test-server.example.com/api/v1/proxy/qgisserver).
NB 2: I could of course build unique containers on each of the nodes and in the ADD step in Dockerfile copy the modified nginx.conf. But this would, in my opinion, overcomplicate things as the only difference between the images would be that single line in nginx.conf.
Ideally I need to specify a value inside the Docker Compose file (or using an environmental variable on the node running the container) and have that value passed all the way to container's /etc/nginx/nginx.conf.
I hope to hear some ideas from you. Thank you for your hard work! 🚀
The text was updated successfully, but these errors were encountered:
You can also try to set the HTTP header by your proxy in front of QGIS Server. But that's a different approach compared to rewrite it with NGINX / APACHE
Problem description
I can't figure out how the URLs inside the responses (e.g. WFS3 JSON response or the WMS
GetCapabilities
) get their hostname.I have a scenario where the container runs with its built in NGINX. In addition, I have another application in front of the QGIS Server, which has its own proxy mechanism through with I expose the container. So to get a response from e.g. the WFS3 endpoint, I can reach it at:
But the response contains references to container's internal endpoint:
Furthermore, I have no idea where the hostname of
https://qgis-server:443
comes from as mydocker-compose.yaml
looks like this:What I try to do
I would like my responses from the OGC services (whether it's the already mentioned WFS3 or e.g. WMS with its XML responses) to contain the URL to my proxy (
https://hajkmap.example.com/api/v1/proxy/qgisserver
) instead of the current value (https://qgis-server:443
).NB: I can't do this using the QGIS project file's "Announced URL" function because the address of the proxy will vary, depending on the node running the container (it could be at
https://production-server.example.com/api/v1/proxy/qgisserver
as well ashttps://internal-test-server.example.com/api/v1/proxy/qgisserver
).NB 2: I could of course build unique containers on each of the nodes and in the
ADD
step inDockerfile
copy the modifiednginx.conf
. But this would, in my opinion, overcomplicate things as the only difference between the images would be that single line innginx.conf
.Ideally I need to specify a value inside the Docker Compose file (or using an environmental variable on the node running the container) and have that value passed all the way to container's
![image](https://private-user-images.githubusercontent.com/110222/270333124-53edcbe7-fbe8-4849-8799-40350d692a33.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxNDg5OTIsIm5iZiI6MTcyNjE0ODY5MiwicGF0aCI6Ii8xMTAyMjIvMjcwMzMzMTI0LTUzZWRjYmU3LWZiZTgtNDg0OS04Nzk5LTQwMzUwZDY5MmEzMy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwOTEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDkxMlQxMzQ0NTJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05YzY4ZGFiNzI0ZWQxMWUzNGIxNTM3MzYxNmU1ZTE2NTRkYWJkODQzODg2NjdhNDg0OWZjOTc0MWQ0YzEyYjg0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.kLQTB_jQJ3NIzmJdfkxDrv9F3wWYsSmkV_xnsjyhEOE)
/etc/nginx/nginx.conf
.I hope to hear some ideas from you. Thank you for your hard work! 🚀
The text was updated successfully, but these errors were encountered: