Yes. Of course "fastcgi_pass $pool;". This should work.
==
Parameter value can contain variables.
==
https://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_pass
Posted at Nginx Forum:
https://forum.nginx.org/read.php?2,293738,293742#msg-293742
__
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
'$pool' variable will be created just after the request come. This is how
the 'map' works.
To make this work you will have to use this variable in "proxy_pass".
===
server {
.
proxy_pass http://$pool;
}
===
Posted at Nginx Forum:
https://forum.nginx.org/read.php?2,293738,293739#msg-29
Arguments from the requests are not taken into account when nginx choosing
locations.
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