Answer the question
In order to leave comments, you need to log in
How to remove a piece of the path when rewrite in nginx?
For example, there is a typical redirect:
location /path/to/url {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:8080;
}
How to remove /path/to/url for final gate? So that the URL coming to 127.0.0.1:8080 does not start with /path/to/url, but with /.
Thank you.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question