rewrite proxy flag set problem

Jonathan Matthews contact at
Mon Mar 26 11:56:47 UTC 2012

On 26 March 2012 12:39, niraj <nginx-forum at> 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(.*)$$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;
> }

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..
> for that I required to write a regular expression
>  rewrite /auction(.*)$$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 says: "If the
replacement string begins with http:// then the client will be
This means that the only reason the rewrite is working for *you* is
because your client machine has direct access to 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 Matthews
London, Oxford, UK

More information about the nginx mailing list