Nginx rewrite issue

OS_Killer nginx-forum at
Sun Feb 20 19:40:05 UTC 2022

Arguments from the requests are not taken into account when nginx choosing
Try to use the 'map' directive instead.
For example:
map $arg_target $backend {
 'server1' 'server1';
 'server2' 'server2';
  default  'server1';

server {
 listen 80;
  location = /index.html {
   proxy_pass http://$backend;

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

More information about the nginx mailing list