I have a Django app with Gunicorn, going throught Varnish and served with Nginx.
MyDjangoApp --> Gunicorn --> Varnish --> Nginx --> Client
Which one of the gzip params I have to keep ?
In Django ?
MIDDLEWARE_CLASSES = (
# Remove Django Gzip middleware as we already have it in nginx ?
'django.middleware.gzip.GZipMiddleware',
....
In Nginx ?
http {
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
....
In Varnish ?
sub vcl_backend_response {
if (bereq.url ~ "html$") {
set beresp.do_gzip = true;
}
....
Do I have to activate on all confs or Just Nginx ? If I activate the GZipMiddleware in Django for ex, I should not need to activate it on Varnish & Nginx or I'm missing something ?