Home Nginx forward with URL rewrite and proxy_pass
 I am looking for help in nginx configuration while forwarding request to another domain . Proxy scenarios: https://service1.com/downloads -> https://service2.com/app/downloads https://service1.com/downloads?param1=a¶m2=b -> https://service2.com/app/downloads?param1=a¶m2=b  Browser should have left side URL(service1) all the time. But Service 2 endpoints are different, it has additional param 'app'. I have done this without considering 'app' param in service 2 endpoints using below config: location /downloads { set $upstream_endpoint https://service2.com; proxy_pass$upstream_endpoint; }  But i need help, when i want to append some addition param ('app') while calling service2 endpoint. I am trying with rewrite and proxy_pass but no luck. I have enable the upstream log and don't see the expected upstream URL location /downloads { set $upstream_endpoint https://service2.com; proxy_pass$upstream_endpoint/app/\$args; }  Thanks in Advance