Rewriting location directive by upstream servers

Francis Daly francis at
Thu Sep 25 21:05:52 UTC 2014

On Fri, Sep 26, 2014 at 01:20:18AM +0530, thunder hill wrote:

Hi there,

> When I access the upstream server rewrites the url like
> instead of and  the result is a
> blank page.
> Users are allowed either or In both the
> cases app1 and app2 are getting rewritten with login or some other
> extension. How to solve this issue.?

I believe that the easiest way, if you want both to be available via
the same hostname, is to install-or-configure app1 on backend1 to be
available below the url /app1/, not below /.

And do something similar for app2.

And then remove the final "/" in your proxy_pass directives.

Francis Daly        francis at

More information about the nginx mailing list