Answer the question
In order to leave comments, you need to log in
NGINX request proxying with rewrite
Is it possible to proxy requests to UPSTREAM in NGINX by applying rules to the REWRITE request? For example, there is a request like:
get /one/two/three/four/image.png
You need to proxy it to upstrem in the form of GET /one?param1=two¶m2=three, etc.
Reading the documentation didn't help
Answer the question
In order to leave comments, you need to log in
nginx.org/ru/docs/http/ngx_http_proxy_module.html#proxy_pass
location /name/ {
rewrite /name/([^/]+) /users?name=$1 break;
proxy_pass 127.0.0.1;
}
Isn't it?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question