Rewriting location directive by upstream servers

thunder hill thunderhill4 at gmail.com
Fri Sep 26 04:42:47 UTC 2014


Hi,

On Fri, Sep 26, 2014 at 2:35 AM, Francis Daly <francis at daoine.org> wrote:

> On Fri, Sep 26, 2014 at 01:20:18AM +0530, thunder hill wrote:
>
> Hi there,
>
> > 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.?
>
> 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.
>

Thats the easiest way. Unfortunately there is no control over backend
server(s).

Just a thought:
Is there a way to keep the url  mysite.com/app1 and go on with
mysite.com/app1/login. That means backend server can only rewrite the
strings after  mysite.com/app1
Or are there any other ways?

Regards
T
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20140926/341bf20e/attachment.html>


More information about the nginx mailing list