Try_files and proxy_pass

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

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

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

  • Jeff

I found the problem: I was putting a final slash in the proxy_pass :wink:

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

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;
}

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs