2 messages in ru.sysoev.nginxRe: conditional proxy ?
FromSent OnAttachments
Martin MinkaJun 14, 2007 3:30 am 
Igor SysoevJun 14, 2007 8:27 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: conditional proxy ?Actions...
From:Igor Sysoev (is-G@public.gmane.org)
Date:Jun 14, 2007 8:27:38 am
List:ru.sysoev.nginx

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.