ssi includes in reverse-proxied pages?

Anton Yuzhaninov citrin at citrin.ru
Fri Aug 22 19:36:21 MSD 2008


On 22.08.2008 19:22, William Ross wrote:
> On 22 Aug 2008, at 10:41, Anton Yuzhaninov wrote:
> 
>> On 22.08.2008 13:23, William Ross wrote:
>>> Quick question: is it possible for nginx to parse SSI directives in 
>>> pages retrieved from upstream?
>>
>> Yes, it possible. Just add ssi on; in location with proxy_pass.
> 
> Thank you. That's what I've been doing, but so far it's not working. The 
> proxy works, and SSI works in local files, but together they don't work. 
> The SSI directives pass through untouched, so it looks like the upstream 
> pages are not parsed but travel straight through, but the debug log does 
> include a few lines like this:
> 
> 2008/08/22 16:14:26 [debug] 436#0: *34 finalize http upstream request: 0
> 2008/08/22 16:14:26 [debug] 436#0: *34 finalize http proxy request
> 2008/08/22 16:14:26 [debug] 436#0: *34 free rr peer 1 0
> 2008/08/22 16:14:26 [debug] 436#0: *34 close http upstream connection: 38
> 2008/08/22 16:14:26 [debug] 436#0: *34 http upstream temp fd: -1
> 2008/08/22 16:14:26 [debug] 436#0: *34 http output filter "/?"
> 2008/08/22 16:14:26 [debug] 436#0: *34 copy filter: "/?"
> 2008/08/22 16:14:26 [debug] 436#0: *34 http ssi filter "/"
> 2008/08/22 16:14:26 [debug] 436#0: *34 ssi out: 000000000059EEB0 
> 0000000000000000
> 
> The page is gzipped upstream. Would that stop the proxy parsing the pages?
> 

Page should be not compressed AFAIK.
To tell upstream don't compress page you may add

proxy_set_header   Accept-Encoding  "";

or better change gizp related settings on upstream server.

-- 
  Anton Yuzhaninov





More information about the nginx mailing list