Quantcast
Channel: Nginx Forum
Viewing all articles
Browse latest Browse all 53287

Re: Location header rewriting needed

$
0
0
After some time I found what's causing the problem. A trailing slash was missing on the URI part:

location / {
proxy_pass http://<server1_ip>:7777
}

location /server1/ {
proxy_pass http://<server1_ip>:7777/;
}

location /server2/ {
proxy_pass http://<server2_ip>:7777/;
}

However the next problem is that due to the slash "+" characters in my URI get converted to %2b, which the backend doesn't understand. I know the solution would be to to remove the trailing slash after the 7777, however that causes the backend to not work properly either as the server is redirecting me to the main server instead of processing the request himself.

It there any other way to prevent the URI decoding/processing?

Viewing all articles
Browse latest Browse all 53287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>