Answer the question
In order to leave comments, you need to log in
How to change the context using nginx?
There is a backend (upstream) , in which, alas, you cannot change how to give the context.
It is necessary that by location / id / work proxy_pass to this server.
those
location /id/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass server/am/uth/;
Answer the question
In order to leave comments, you need to log in
You can try to extract uth / admin / other through map into a variable and use it for sub_filter.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question