I have two domain names, each for different applications hosted in a single kubernetes cluster.
Is there a way to configure ingress to redirect to the different apps based on the hostname in the request it receives?
For example:
www.app1.com
and www.app2.com
point to the same IP address. However, I want www.app1.com
to redirect to /appABC
while www.app2.com redirect to /appXYZ
.
I have attempted to capture the host name and use this to determine the redirect but it doesn't work.
Is what I'm trying to do possible with NGINX?