erfan
(Erfan)
January 25, 2022, 6:37pm
1
As I was a new user it did not let me to post the whole question in one post. Please read reply 1 and 2 as part of the question
Hi
I am looking to reverse proxy [mysubdomain.mydomain.com/home ] to my webflow home page website my website is hosted in azure kubernetes service (AKS). We use Kubernetes NGINX ingress as our reverse proxy.
This is what I want to achieve
www.mydomian .com/* → goes to my angular app
www.mydomain.com/home → goes to webflow site. without the url gets changed in the browser. without an obvious redirect.
To achieve this we followed Partial site hosting with reverse proxy - #3 by cameronbell & Href prefix | Webflow University and added a DNS CNAME record for [mysubdomain.cms.mydomain.com ] to(http://proxy-ssl.webflow.com/ ).
Here is my K8 configuration:
External Service:
apiVersion: v1
kind: Service
metadata:
name: webflow-service
namespace: dev
spec:
type: ExternalName
externalName: mysubdomain.cms.mydomain.com```
erfan
(Erfan)
January 25, 2022, 6:38pm
2
Ingress:
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: myapp-ingress
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/app-root: /home/
nginx.ingress.kubernetes.io/rewrite-target: /$1
nginx.ingress.kubernetes.io/use-regex: "true"
cert-manager.io/cluster-issuer: letsencrypt
nginx.ingress.kubernetes.io/upstream-vhost: "mysubdomain.cms.mydomain.com"
nginx.ingress.kubernetes.io/configuration-snippet: |
more_set_input_headers 'Host: mysubdomain.cms.mydomain.com';
proxy_set_header Host mysubdomain.cms.mydomain.com;
spec:
tls:
- hosts:
- mysubdomain.mydomain.com
secretName: tls-secret-website
rules:
- host: mysubdomain.mydomain.com
http:
paths:
- path: /home/(.*)
backend:
serviceName: webflow-service
servicePort: 80
- path: /(.*)
backend:
serviceName: myotherapp
servicePort: 80```
erfan
(Erfan)
January 25, 2022, 6:39pm
3
when we browse the mysubdomain.mydomain.com user gets redirected to mysubdomain.mydomain.com/home and then to
mysubdomain.cms.mydomain.com and the address bar changes. So redirection happens but it dose not reverse proxy.
I mean the address bar in the url changes to mysubdomain.cms.mydomain.com I want my users still see mysubdomain.mydomain.com/home in their browser.
here is my setting at web flow:
Href Prefix: /Home
Custom domain: mysubdomain.cms.mydomain.com → marked as default
What I need to achieve is performing the redirect without the url gets changed.
any help is very much appreciated.
Thanks