i have a scenario but i do not know how to configure nginx to attain this: the clients request "X.DOMAIN-A.XYZ" and the request goes to nginx which is configure as a reverse proxy. now the nginx must rewrite the domain as a "Z.DOMAIN-B.TRD" and forward it to origin server (upstream server).
|client|---X.DOMAIN-A.XYZ--->|nginx|---Z.DOMAIN-B.TRD--->|origin server| i need config example?