tags:

views:

191

answers:

1

Hi I used config given in this http://www.webtatic.com/blog/2008/04/page-level-caching-with-nginx/ for page level caching of php content the problem is that the cached page is saving in gzip format and it returning same gzip content to browser.

I need the o/p like this "12:15:37 12:15:47" (Its coming for 1st time when the page is not cached) after that if request is resend it is returning ‹������34²26±24à23Œ¸¸�`Î9”��� (gzip response as I tried zcat its returning fine)

Response Headers

Server nginx/0.8.34

Date Wed, 17 Mar 2010 07:04:58 GMT

Content-Type text/html

Last-Modified Wed, 17 Mar 2010 07:04:20 GMT

Transfer-Encoding chunked

Connection keep-alive

Vary Accept-Encoding

Expires Wed, 17 Mar 2010 07:04:58 GMT

Cache-Control max-age=0

Content-Encoding gzip

Request Headers

Host localhost

User-Agent Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.18) Gecko/2010021501 Ubuntu/9.04 (jaunty) Firefox/3.0.18 GTB6

Accept text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8

Accept-Language en-us,en;q=0.5

Accept-Encoding gzip,deflate

Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive 300

Connection keep-alive

A: 

Its possible you missed adding the gzip_static option which will serve gzipped content correctly.

However, I have now posted a new article based on Nginx 0.7+ which is better for use as a proxy cache. It doesn't need that option anymore.

http://www.webtatic.com/blog/2010/04/page-level-caching-with-nginx/

Andy