Hi,
I just test a Kubernetes Installation based on you documentation at https://github.com/ONLYOFFICE/Kubernetes-Docs and it works fine.
I used the nginx-ingress as described here: Expose DocumentServer via HTTP
But is there a way to expose it to a subdirectory like you described it here for a normal installation?
{{ if .Values.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: documentserver
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/proxy-body-size: 100m
nginx.ingress.kubernetes.io/rewrite-target: /$2
nginx.ingress.kubernetes.io/configuration-snippet: |
proxy_set_header X-Forwarded-Host $best_http_host/onlyoffice/;
spec:
{{ if .Values.ingress.ssl.enabled }}
tls:
- hosts:
- {{ .Values.ingress.ssl.host }}
secretName: {{ .Values.ingress.ssl.secret }}
{{ end }}
rules:
{{ if .Values.ingress.ssl.enabled }}
- host: {{ .Values.ingress.ssl.host }}
{{ else }}
- host:
{{ end }}
http:
paths:
- path: /onlyoffice(/|$)(.*)
pathType: Prefix
backend:
service:
name: documentserver
port:
number: 8888
{{ end }}
But it always redirects me to /welcome.
The Variable $best_http_host
seems to be the dynamic hostname from the lua script in the generated nginx config in the nginx-ingress.
Best regards
Uli