Skip to content

Instantly share code, notes, and snippets.

@TiuTalk
Created June 24, 2011 21:17
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save TiuTalk/1045708 to your computer and use it in GitHub Desktop.
Save TiuTalk/1045708 to your computer and use it in GitHub Desktop.
Habilitando GZIP em servidores Nginx
# Habilita o gzip
gzip on;
gzip_http_version 1.1;
gzip_vary on;
gzip_comp_level 6;
gzip_proxied any;
# Mime-types que serão compactados
gzip_types text/html text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
# http://blog.leetsoft.com/2007/7/25/nginx-gzip-ssl
gzip_buffers 16 8k;
# Desabilita o gzip para alguns navegadores
gzip_disable "MSIE [1-6].(?!.*SV1)";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment