I need proxing to different backend but whith same url, so rewriting thould be like this
URL: http://myservrer.com/server/monitoring1?(parameters) REWRITE TO: http://1.1.1.1/server/monitoring?(parameters) URL: http://myservrer.com/server/monitoring2?(parameters) REWRITE TO: http://2.2.2.2/server/monitoring?(parameters) My current config:
location /server/monitoring1 { proxy_pass http://1.1.1.1:82/server/monitoring; } location /server/monitoring2 { proxy_pass http://2.2.2.2:82/server/monitoring; } How to change it with rewrite options?