rewrite proxy flag set problem

Igor Sysoev igor at sysoev.ru
Tue Mar 27 05:25:49 UTC 2012


On Tue, Mar 27, 2012 at 09:18:39AM +0400, Igor Sysoev wrote:
> On Tue, Mar 27, 2012 at 12:29:06AM -0400, niraj wrote:
> > Hi
> > 
> >     Sorry for that Mess up.
> > 
> >    As u suggested I have added the following line
> > 
> > location /auction/ {
> > proxy_pass http://192.168.1.210;
> > 
> >  when I click into my application I got the error that I mentioned in
> > earlier e-mail.
> > 
> > that error log of  original server (192.168.1.45)  and there is no log 
> > for 192.168.1.210  error log file.
> > 
> > this is the request that my application is sending to the Nginx
> > 
> > auction?id=1332416535292370.0097187543142212
> > 
> > 
> > In above example and as u suggested it will proxy or redirect the
> > /auction  folder query to the    http://192.168.1.210;
> > 
> > but you can see above request its not call the /auction folder. 
> > 
> > so we required to do something like  auction(.*)      am I correct ?
> > 
> > And As I know proxy_pass not support the regular expression (.*)    is
> > it correct ?
> 
> You do not need regular expression in this case.
> It seems you need just these two locations:
> 
> location = /auction {
>     proxy_pass http://192.168.1.210;
> }
> 
> to proxy requests like "/auction?id=1332416535292370.0097187543142212"

Or

location = /auction {
    proxy_pass http://192.168.1.210/;
}

if request "/auction?id=1332416535292370.0097187543142212" should be
proxied to "http://192.168.1.210/?id=1332416535292370.0097187543142212".


-- 
Igor Sysoev



More information about the nginx mailing list