Gzip compression not working with pages served through memcached

Maxim Dounin mdounin at mdounin.ru
Wed Apr 11 21:27:39 UTC 2012


Hello!

On Wed, Apr 11, 2012 at 11:17:46AM -0400, jaynyc wrote:

> Hi,
> 
> I'm trying to set up nginx so that it serves entire pages from
> memcached. If it can't find the requested URI in memcached, it proxies
> the request to Apache (running on port 8080 on the same server). It
> seems to work so far, the only problem being that gzip compression does
> not work for pages served through memcached. Also, I'm using Ubuntu 11.

[...]

>        default_type  "text/html; charset=utf-8";
>        source_charset utf-8;
>        charset utf-8;

Use

   default_type text/html;
   charset utf-8;

instead.  Your attempt to put charset into default_type confuses 
gzip_types matching and gzip isn't activated as it thinks response 
content type isn't listed in gzip_types.

Maxim Dounin



More information about the nginx mailing list