Nginx doesn't rewrite correctly when redirecting to the thin cluster
Added by Miodrag Milic almost 13 years ago
Hello there,
with this configuration:
upstream local_thin_cluster {
server 127.0.0.1:3000;
server 127.0.0.1:3001;
}
server {
#listen 80;
access_log /usr/share/redmine/log/nginx_access.log;
error_log /usr/share/redmine/log/nginx_error.log;
root /usr/share/redmine/public;
proxy_redirect off;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
try_files $uri $uri/index.html $uri.html @cluster;
}
location @cluster {
proxy_pass http://local_thin_cluster ;
}
}
The problem I have is that after login redirection in redmine I get the address http://local_thin_cluster/my/page. It works OK if I access thin server via port directly.
Could anybody help ?
Replies (1)
RE: Nginx doesn't rewrite correctly when redirecting to the thin cluster
-
Added by Miodrag Milic almost 13 years ago
It started working when proxy_redirect off; was moved inside location.