0
votes

My issue is that I have a web server running on port 80. I want to use nginx proxy (not the ingress) bto redirect the connection. I want to use link wwww.example.com. How should I tell nginx to proxy the connection on wwww.example.com (which is a different app). I tried using service with load balancer but it changes the hostname ( to some aws link) I need it to be exactly wwww.example.com.

1
Have you tried NodePort? Create A Record points to cluster machine, and access proxy via www.example.com:<NodePort>?...(But it is not a efficient solution)Veerendra Kakumanu

1 Answers

0
votes

If I understood your request correctly, you may just use return directive in your nginx config

server {
    listen 80;
    server_name www.some-service.com;
    return 301 $scheme://wwww.example.com$request_uri;
}

If you need something more complex check this doc or this