try_files and proxy_pass

Igor Sysoev is at rambler-co.ru
Tue Aug 18 09:21:06 MSD 2009


On Mon, Aug 17, 2009 at 10:39:01PM -0300, Walter Cruz wrote:

> Hi! I would like to use a setting like that:
> 
>    location / {
>        try_files $uri $uri/ @proxy;
>    }
> 
>    location @proxy 
>        proxy_pass http://127.0.0.1:8089;
>    }
> 
> With nginx serving static content and apache serving dinamic content. With
> that setting. I got a error:
> 
> "proxy_pass" may not have URI part in location given by regular expression,
> or inside named location, or inside the "if" statement, or inside the
> "limit_except" block in
> 
> Is that a nginx limitation ? (Can't use a proxy in try_files fallback)
> 
> Nginx version: 0.7.61

This message appears if you set

    location @proxy 
        proxy_pass http://127.0.0.1:8089/;
    }

but not for

    location @proxy 
        proxy_pass http://127.0.0.1:8089;
    }


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list