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
/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: