Welcome! Log In Create A New Profile

Advanced

Re: Proxy with URI and params

January 16, 2012 04:56PM
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@perusio.net>wrote:

> On 16 Jan 2012 19h56 WET, robsonpeixoto@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@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
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Proxy with URI and params

robsonpeixoto January 16, 2012 02:58PM

Re: Proxy with URI and params

António P. P. Almeida January 16, 2012 03:08PM

Re: Proxy with URI and params

robsonpeixoto January 16, 2012 04:56PM

Re: Proxy with URI and params

António P. P. Almeida January 16, 2012 07:42PM

Re: Proxy with URI and params

António P. P. Almeida January 16, 2012 08:06PM

Re: Proxy with URI and params

robsonpeixoto January 17, 2012 06:28AM

Re: Proxy with URI and params

António P. P. Almeida January 17, 2012 07:52AM

Re: Proxy with URI and params

robsonpeixoto January 18, 2012 12:42PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 104
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready