Nginx rewrite issue

Dr_tux nginx-forum at
Sun Feb 20 13:17:21 UTC 2022


I want to write a rewrite like http://url/index.php?target=server1 and
http://url/target=server1 in Nginx and I want to use it in reverse proxy.
This is possible in AWS, but how can I do it in Nginx?

I tried as follows. Not worked.

location = /index.html?target=server1 {
  proxy_pass http://server1;

location = /index.html?target=server2 {
  proxy_pass http://server2;

Posted at Nginx Forum:,293708,293708#msg-293708

More information about the nginx mailing list