conditional proxy ?
Igor Sysoev
is at rambler-co.ru
Thu Jun 14 19:28:01 MSD 2007
On Thu, Jun 14, 2007 at 12:31:20PM +0200, Martin Minka wrote:
> Please advice how to achieve something like:
>
> if ($query_string ~* "/?advert=") {
> proxy_pass http://banner.server.com;
> proxy_buffering off;
> proxy_redirect off;
> proxy_set_header Host $http_host;
> proxy_set_header X-Real-IP $remote_addr;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> }
Currently only this way:
location = / {
if ($query_string ~* ^advert=) {
proxy_pass http://banner.server.com;
}
proxy_buffering off;
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
> I am using Nginx 0.6.0 on production server now.
OK.
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list