Proxy with URI and params

António P. P. Almeida appa at perusio.net
Tue Jan 17 00:41:38 UTC 2012


On 16 Jan 2012 21h54 WET, robsonpeixoto at gmail.com wrote:

> [1  <multipart/alternative (7bit)>]
> [1.1  <text/plain; UTF-8 (quoted-printable)>]
> 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.

Then you need to be clear on what you want.

Perhaps you just and to proxy_pass to another host. Or if you want to
have other stuff like images and such try:

location /delivery {

    location ~* /delivery/[^/]*.\(?:css|js|gif|jpe?g|png)$ {
        proxy_pass http://www.proxy.com;

    }     

    proxy_pass http://www.proxy.com$uri/?var1=A&var2=B;
}

I'm just guessing. We could help you more if stated more clearly
what's your purpose.

--- appa



More information about the nginx mailing list