Here is the configuration for my reverse proxy server:
server {
listen 8085 ssl;
server_name localhost;
location / {
proxy_pass http://192.168.85.56:8080;
}
}
For an incoming path, e.g.: https://localhost:8085/path1/1/path2/
, I want to remove the /1/
, so the resulting path will be https://localhost:8085/path1/path2/
.
One constraint is that path1
can change to any string.
Also, matching on any number instead of just 1
is also a valid solution.
How can this be done?
Edit:
My problem is very similar to this one, except that I have a string, path1
, that can vary.