proxy_cache_bypass with ssi caches template

Maxim Dounin mdounin at
Tue Jan 11 02:30:44 MSK 2011


On Mon, Jan 10, 2011 at 02:55:04PM -0500, bponury wrote:

> Hi everyone,
> I've been struggling with this for some time now trying to drop varnish
> in favor for nginx.
> Server: nginx/0.8.54
> quick peek on problem - SSI on; proxy_cache_bypass caches backend
> response as regular html page with HTTP/1.1 200 OK inside, so next fetch
> from cache will return to client a page with SSI tags inside
> (unprocessed).


> So, is there something I'm missing or this just can't be done?

The problem is that proxy_cache_bypass doesn't work as of now (it 
usually corrupts response headers, though may corrupt response 
body/cause other problems as well).  It may only be used with 
identical proxy_no_cache.

The problem you see with SSI is related to corrupted response 
headers - response no longer has Content-Type and not processed by 
SSI as a result.

Maxim Dounin

More information about the nginx mailing list