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
On 2022-02-20 8:17 a.m., Dr_tux wrote:
Hello,
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 = /inde
Hello,
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 htt