Welcome! Log In Create A New Profile

Advanced

Re: rewrite proxy flag set problem

Jonathan Matthews
March 26, 2012 07:58AM
On 26 March 2012 12:39, niraj <nginx-forum@nginx.us> wrote:
> Hi
>
>
>  I have installed the catalyst and I am trying to integrate the same
> with Nginx.

I don't know what "the catalyst" is, sorry. I'm not sure I need to, however.

>  rewrite /auction(.*)$ http://192.168.1.210$1;
>
> the following rewrite rule is working for me right now.
>
> If I write rule that u mentioned then it will gives the error
>
> location /auction/ {
> proxy_pass http://192.168.1.210;
> }

You need to tell us what "the error" is. Just saying that an error
occurs really isn't helpful.

> The reason for error might is that because my request is just like..
>
> http://192.168.1.45/auction?id=1332416535292370.0097187543142212
>
> for that I required to write a regular expression
>
>  rewrite /auction(.*)$ http://192.168.1.210$1;

Yes, you need to amend the location clause Maxim and I gave you so
that it doesn't mandate a trailing slash. NB this is a *different*
trailing slash from the one I mentioned previously in this thread.

You need *not* to use any rewrite statements in the way that you're
currently doing. As
http://wiki.nginx.org/NginxHttpRewriteModule#rewrite says: "If the
replacement string begins with http:// then the client will be
redirected".
This means that the only reason the rewrite is working for *you* is
because your client machine has direct access to 192.168.1.210. If you
try to make this work for external users, it won't.

Use the "location" method instead of using "rewrite". Get rid of the
trailing slash.

Jonathan
--
Jonathan Matthews
London, Oxford, UK
http://www.jpluscplusm.com/contact.html

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

rewrite proxy flag set problem

niraj March 23, 2012 07:16AM

Re: rewrite proxy flag set problem

Maxim Dounin March 23, 2012 07:52AM

Re: rewrite proxy flag set problem

niraj March 24, 2012 07:48AM

Re: rewrite proxy flag set problem

niraj March 26, 2012 05:41AM

Re: rewrite proxy flag set problem

Jonathan Matthews March 26, 2012 07:06AM

Re: rewrite proxy flag set problem

niraj March 26, 2012 07:39AM

Re: rewrite proxy flag set problem

Jonathan Matthews March 26, 2012 07:58AM

Re: rewrite proxy flag set problem

niraj March 26, 2012 08:27AM

Re: rewrite proxy flag set problem

niraj March 27, 2012 12:29AM

Re: rewrite proxy flag set problem

niraj March 27, 2012 01:22AM

Re: rewrite proxy flag set problem

Jonathan Matthews March 26, 2012 09:40AM

Re: rewrite proxy flag set problem

Igor Sysoev March 27, 2012 01:20AM

Re: rewrite proxy flag set problem

Igor Sysoev March 27, 2012 01:26AM

Re: rewrite proxy flag set problem

niraj March 27, 2012 01:47AM

Re: rewrite proxy flag set problem

Igor Sysoev March 27, 2012 01:54AM

Re: rewrite proxy flag set problem

niraj March 27, 2012 02:07AM

Re: rewrite proxy flag set problem

niraj March 27, 2012 02:52AM

Re: rewrite proxy flag set problem

Igor Sysoev March 27, 2012 02:18AM

Re: rewrite proxy flag set problem

Igor Sysoev March 27, 2012 04:06AM

Re: rewrite proxy flag set problem

niraj March 27, 2012 04:50AM

Re: rewrite proxy flag set problem

Igor Sysoev March 27, 2012 04:56AM

Re: rewrite proxy flag set problem

niraj March 27, 2012 08:47AM

Re: rewrite proxy flag set problem

niraj March 28, 2012 01:31AM

Re: rewrite proxy flag set problem

niraj April 09, 2012 04:26AM

Re: rewrite proxy flag set problem

Igor Sysoev March 27, 2012 09:02AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 119
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready