Proxy with URI and params

Robson Roberto Souza Peixoto robsonpeixoto at gmail.com
Mon Jan 16 21:54:59 UTC 2012


Thanks Antonio.

Now the problem is with the images, css and others thinks.
When the site is loaded, it try to download from www.example.com, and not
from www.proxy.com.

For example, the browser try to get the www.example.com/menu.css, but the
correct is try to download the www.proxy.com/menu.css.

How to fix it?

Thanks

On Mon, Jan 16, 2012 at 6:06 PM, António P. P. Almeida <appa at perusio.net>wrote:

> On 16 Jan 2012 19h56 WET, robsonpeixoto at gmail.com wrote:
>
> > Hi,
> >
> > I need to make a proxy solution. But I having some problems.
> >
> > When the type www.example.com/delivery/a/b/c I need to make a proxy
> > to www.proxy.com/delivery/a/b/c/?var1=A&var2=B
> >
> > So a did this configuration
> >
> > location /delivery {
> > subs_filter http://www.example.com/$uri
> > http://www.proxy.com/$uri/?var1=A&var2=B;
> > proxy_pass http://www.proxy.com/$uri/?var1=A&var2=B;
> > }
> >
> > Why it not working ?
>
> Because the HTTPSubModule replaces something on the *request body* not
> on the configuration.
>
> I suppose you want something like this:
>
> server {
>   server_name www.example.com;
>
>   location /delivery {
>       proxy_pass http://www.proxy.com$uri/?var1=A&var2=B;
>   }
> }
>
> $uri already starts with a '/'.
>
> --- appa
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>



-- 
Robson Roberto Souza Peixoto
Robinho
Master in Computer Science, University of Campinas
Linux Counter #395633
IRC: robsonpeixoto
Twitter: http://twitter.com/rrspba
github: https://github.com/robsonpeixoto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20120116/a5425a40/attachment.html>


More information about the nginx mailing list