Welcome! Log In Create A New Profile

Advanced

Re: help about how proxy_cache to store differet cache file by http header vary Accept-Encoding like squid

Mirosław Jaworski
March 03, 2010 01:30PM
On Thu, 2010-03-04 at 01:19 +0800, yangchunyu wrote:
> We use nginx as reserve proxy server and want use proxy_cache to replace squid.
> There are apache servers behind nginx, we use deflate module to compress text/html pages.
> The problem is if proxy_cache has cached the compressed page but the client side that request page does not support uncompress, the page can not be see correctly.
> I know squid using http header Accept-Encoding to store different cache file, but there is no way to use it in nginx proxy_cache_key.

You can try to use proxy_cache_key to define caching key ( i don't
know however if you find variable that will do trick ).

The other method i would think of is not letting nginx to cache
compressed content. And i don't mean caching or not depend on
whether backend response is compressed or not - i mean forcing
uncompressed transmission between nginx and backends.
You may even gain another benefit - lessen the compression burden
on backends which may give you spare cpu cycles on them.

I believe
proxy_set_header Accept-Encoding "";
in proxying location is the way to go.

--
Miroslaw "Psyborg" Jaworski
GCS/IT d- s+:+ a C++$ UBI++++$ P+++$ L- E--- W++(+++)$ N++ o+ K- w-- O-
M- V- PS+ PE++ Y+ PGP t 5? X+ R++ !tv b++(+++) DI++ D+ G e* h++ r+++ y?


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

help about how proxy_cache to store differet cache file by http header vary Accept-Encoding like squid

yangchunyu March 03, 2010 12:24PM

Re: help about how proxy_cache to store differet cache file by http header vary Accept-Encoding like squid

Mirosław Jaworski March 03, 2010 01:30PM

RE: help about how proxy_cache to store differet cache file by httpheader vary Accept-Encoding like squid

杨春宇 March 05, 2010 02:30AM

Re: help about how proxy_cache to store differet cache file by httpheader vary Accept-Encoding like squid

Ryan Malayter March 12, 2010 12:14AM

RE: help about how proxy_cache to store differet cache file by httpheader vary Accept-Encoding like squid

杨春宇 March 12, 2010 08:44AM

Re: help about how proxy_cache to store differet cache file by httpheader vary Accept-Encoding like squid

Ryan Malayter March 12, 2010 11:12AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 180
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready