Skip to content
This repository has been archived by the owner on Mar 15, 2022. It is now read-only.

Does not work correctly behind a Nginx Reverse Proxy with context root other than '/' #6

Open
ShahBinoy opened this issue Apr 7, 2016 · 3 comments

Comments

@ShahBinoy
Copy link

I am using nginx as a reverse proxy in front of relumin. below is the config

   location /cluster {
            proxy_pass http://72.128.146.180:9090;
            proxy_set_header  X-Real-IP $remote_addr;
            proxy_set_header  X-Forwarded-For $http_x_forwarded_for;
            proxy_set_header REMOTE_ADDR $http_x_real_ip;
            proxy_set_header Host $http_host;
    }
    location /login {
            proxy_pass http://72.128.146.180:9090/login;
            proxy_set_header  X-Real-IP $remote_addr;
            proxy_set_header  X-Forwarded-For $http_x_forwarded_for;
            proxy_set_header REMOTE_ADDR $http_x_real_ip;
            proxy_set_header Host $http_host;
    }
    location /vendor {
            proxy_pass http://72.128.146.180:9090/vendor;
            proxy_set_header  X-Real-IP $remote_addr;
            proxy_set_header  X-Forwarded-For $http_x_forwarded_for;
            proxy_set_header REMOTE_ADDR $http_x_real_ip;
            proxy_set_header Host $http_host;
    }

But after login the redirection happens to '/' root context and the application does not work further than that.

Can this be changed to redirecting to the relative root context ?

@be-hase
Copy link
Owner

be-hase commented May 11, 2016

@ShahBinoy
Thanks for your report.

I will try on next version.
Please wait. :D

@be-hase
Copy link
Owner

be-hase commented Jun 25, 2016

Hi.

Why don't you use this setting?

location / {
            proxy_pass http://72.128.146.180:9090;
            proxy_set_header  X-Real-IP $remote_addr;
            proxy_set_header  X-Forwarded-For $http_x_forwarded_for;
            proxy_set_header REMOTE_ADDR $http_x_real_ip;
            proxy_set_header Host $http_host;
}

I wonder why you separate location setting.
location /cluster, location /login, location /vendor

@ShahBinoy
Copy link
Author

I wanted to provide different proxy endpoints to different users. So wanted to separate out some portions with basic Auth. I will try again. Thank you for response.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants