Sorry, but we have no example configuration for virtual path in Nginx Ingress Controller.
As far as I understand, there were some issues with X-Forwarded-* headers which prevented us from creating such example config.
The trick seems to be, that for virtual hosts, the path is a part of the x-Forwarded-Host.
For example:
Incoming Header: x-Forwarded-Host: demosystem.ch/onlyoffice
Transfered Header: x-Forwarded-Host: demosystem.ch/onlyoffice
The nginx will transfer this header unchanged to the docservice etc.
But maybe it is possible to merge the X-Forwarded-Host with the X-Forwarded-Prefix to the docservice so the Revers Proxy in the front can transfer the path information also as separate header.
Background is, that Kubernetes ingress seems to support the X-Forwarded-Prefix better then the modified X-Forwarded-Host (as far as I understand, a kubernetes internal nginx lua script recalculate the X-Forwarded-Host header).
I test this in a “normal” windows installation and changed the Reverse Proxy to this header and it seems to work correctly in both cases (modified host and additional prefix).
Do you already check this solution?
Do this change has any disadvantages?
I just verified my guess. I create a own Dockerfile based on your onlyoffice/docs-proxy-de, just replace the file /etc/nginx/includes/http-common.conf and pushed the container on a private repository for testing.
Docker
DockerFile
FROM onlyoffice/docs-proxy-de:6.4.1.45
COPY http-common.conf /etc/nginx/includes/
@cwrau I still use a modified version of the original docker container and update it for each version. My docker image based on the original and just replace the configuration file.
I can post you a example for this if you need it.
docs-proxy-de (docs-proxy-de Developer / docs-proxy-ee Enterprise) is the version you want to build. 7.1.1-4 Is the version of ONLYOFFICE you want to base on.
FROM onlyoffice/docs-proxy-de:7.1.1-4
COPY http-common.conf /etc/nginx/includes/
Hello @uwohlfeil and @cwrau
We are still working on it. As far as I know, there’s open ticket in Zendesk which was created by @uwohlfeil. My colleagues are still working on it and we will notify you when we have something to share.
Sorry for inconvenience.
Hello @uwohlfeil
Please accept our sincere apologies. We are still working on it. My colleagues will contact you via Zendesk system when we have something to share.
Just hit the same issue… I suppose it affects every deployment of the document server container image behind a reverse proxy (i.e. nginx).
I am wondering if the config examples and related docs are valid for this kind of deployment.
Probably we found workaround solution. This is a temporary solution while we’re continuing to troubleshoot the situation, but it works.
We used mentioned http-common.conf file as an example and we changed it a little bit:
Also go to templates/ingress/documentserver.yaml and add this line to -path: parameter: /ds(/|$)(.*)
Please pay attention to ‘/ds’ value in my examples. You have to change it to your virtual path.
One more thing, we can’t guarantee that integrated example will work properly when these actions are performed. Also please prepare whole server backup\snapshot before any actions just in case.
Thanks, will try with the real app, as it fails for the example.
Please also consider passing the incoming headers when the ingress is trusted, as per proxy_pass_request_headers on.