Nginx map assigned variable usage in upstream?

OS_Killer nginx-forum at forum.nginx.org
Thu Feb 24 11:31:16 UTC 2022


Something like this:
=======
map $uri$args $pool {
default php2;
"~/index.php/args" php1;
}

upstream php1 {
zone php_zone 64k;
server 127.0.0.1:9002;
keepalive 2;
}
upstream php2 {
zone php_zone 64k;
server 127.0.0.1:9000;
keepalive 2;
}
server {
.....
proxy_pass http://$pool;
}
=======

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,293738,293740#msg-293740



More information about the nginx mailing list