Certifique-se de instalar o módulo Gzip com o nginx
2>&1 nginx -V | tr -- - '\n' | grep _module | grep gzip
A saída deve ser: http_gzip_static_module
Configuração
Arquivo de configuração do host no bloco do servidor.
gzip on;
gzip_disable "msie6";
gzip_comp_level 6;
gzip_min_length 1100;
gzip_buffers 16 8k;
gzip_proxied any;
gzip_types
text/plain
text/css
text/js
text/xml
text/javascript
application/javascript
application/x-javascript
application/json
application/xml
application/rss+xml
image/svg+xml/javascript;
serviço nginx recarregar
Teste
curl -H "Accept-Encoding: gzip" -I https://example.com/