Answer the question
In order to leave comments, you need to log in
How to write such a location for NGINX?
It is necessary that everything that comes to:
server.com/index.php?r=iframe/index& .
server1.com/index.php?r=iframe/index&
server2.com/index.php?r=iframe/index&
..
upstream balancer {
server server1.com weight=20 max_conns=500 fail_timeout=5s;
server server2.com weight=20 max_conns=500 fail_timeout=5s;
...
}
location ~ /index.php?r=iframe/index\&$ {
proxy_pass http://balancer;
include proxy.inc;
proxy_set_header X-Forwarded-Proto $thescheme;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
Answer the question
In order to leave comments, you need to log in
redirected to the server stack:
location / {
mirror /mirror;
proxy_pass http://backend;
}
location /mirror {
internal;
proxy_pass http://test_backend$request_uri;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question