Nginx reverse proxy on another web server with redirection

Hi all,
I have the problem with configuring nginx to perform proxy redirection
web server that appends some its local path to redirected address. As a
result I get url of my server (where nginx is running) but with path
another machine) appended.

The configuration is:
location ~* ^/3rdparty/(.)___(.)___(.)___(.)$ {
proxy_pass https://$1.$2.$3.$4?$args;
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For

When I type this:
I would expect content from here:
but I get attempt from server to get content from here - which doesn’t

How to remove /users/sign_in sufix but to process that within nginx

When I go directly to target server typing this:
I get redirected to which brings the right content.

Thank you in advance for you comments/help!

Posted at Nginx Forum:,249291,249291#msg-249291

I have also added more detailed description with system diagram at:
Thank you!

Posted at Nginx Forum:,249291,249292#msg-249292

Quick sidenote, not scratching the surface of your problem:
I would have posted on ServerFault, not StackOverflow

B. R.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs