This isn’t correct behaviour, it’s bug introduced in 0.7.1 and
fixed in 0.7.2. Your rewrite directive in location /fallback/
changed the request uri, but nginx failed to do correct search of
new location to use.
It should with ‘last’ flag in rewrite, and shouldn’t with ‘break’
flag. The default is ‘last’, and since you haven’t specified
‘break’ in your config - it should.
I’m not really understand what you are trying to achieve, but I
belive you problem is your backend’s Etag header, which is used by
your browser to check freshness of the page. Backend replies 304
Not Modified - and nginx’s SSI has no chance to modify page.
Try the following:
proxy_hide_header Etag;
This will hide Etag header from responses sent to clients, and
probably will resolve your issue. Of course you need to clear
browser cache once again to remove old version of the page with
Etag.
I’ve tried several times to use named locations in exactly this
fashion with PHP/FastCGI backends, but experienced show-stopping
problems using POST. POSTing data through these locations just
wouldn’t work properly, either throwing 405 errors or, after applying
some configuration changes (static post), simply hanging.
I posted to the list a couple of times but didn’t get any response -
the most recent was “Posting to FastCGI in named locations” on 15 May
(http://article.gmane.org/gmane.comp.web.nginx.english/5036
). It’s frustrating because I can see how much better the named
locations are but have been unable to use them because of this problem.
Do you have any idea what might be the cause?
Many thanks,
Igor
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.