Welcome! Log In Create A New Profile

Advanced

Re: try_files and proxy_pass

August 18, 2009 01:21AM
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/
Subject Author Posted

try_files and proxy_pass

Walter Cruz August 17, 2009 09:39PM

Re: try_files and proxy_pass

Jeff Waugh August 17, 2009 10:09PM

Re: try_files and proxy_pass

Walter Cruz August 17, 2009 10:15PM

Re: try_files and proxy_pass

Igor Sysoev August 18, 2009 01:21AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 240
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready