proxy pass based on IP??

Iantcho Vassilev ianchov at gmail.com
Thu Oct 29 10:34:06 MSK 2009


No...my point is this:


i have

location / {
root ....
index.. ...
 if ($remote_addr = "xxxxxxxxxx"" {
    proxy_pass HERE
    }
}


location ~ \.php
 {
fasct_cgi .....

}

2009/10/29 Igor Sysoev <is at rambler-co.ru>

> On Thu, Oct 29, 2009 at 12:16:02AM +0200, Iantcho Vassilev wrote:
>
> > Is it possible to proxy pass a location based in source IP??
>
> There is a limited solution:
>
> map $remote_addr  $backend {
>     default      one;
>     192.168.1.1  two;
>     192.168.1.2  two;
> }
>
>    location / {
>        proxy_pass  htttp://$backend$request_uri;
>    }
>
>
> --
> Igor Sysoev
> http://sysoev.ru/en/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20091029/845e4620/attachment.html>


More information about the nginx mailing list