Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

Rewriting location directive by upstream servers (2 replies)

$
0
0
Hi,

I have two back end application servers behind nginx. The configuration is
as follows

upstream backend1 {
server 10.1.1.11;
}
upstream backend2 {
server 10.2.2.2;
}
server {
listen 80;
server_name mysite.com;

location /appl1 {
# proxy_set_header X-Real-IP $remote_addr;
proxy_pass https://backend1/;
}
location /app2 {
proxy_pass https://backend2/;

}
}


When I access mysite.com/app1 the upstream server rewrites the url like
mysite.com/login instead of mysite.com/app1/login and the result is a
blank page.

Users are allowed either mysite.com/app1 or mysite.com/app2. In both the
cases app1 and app2 are getting rewritten with login or some other
extension. How to solve this issue.?

Regards
T
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Viewing all articles
Browse latest Browse all 7229

Trending Articles



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