Skip to content

Instantly share code, notes, and snippets.

@wochap
Created May 11, 2017 16:05
Show Gist options
  • Save wochap/8bc13e3c80267e83b375e0e358371225 to your computer and use it in GitHub Desktop.
Save wochap/8bc13e3c80267e83b375e0e358371225 to your computer and use it in GitHub Desktop.
nginx config
# /etc/nginx/conf.d/gzip.conf
# activar gzip
gzip on;
# 75% de reduccion
gzip_comp_level 5;
# usar gzip en clientes conectados mediante un proxy
gzip_proxied any;
# activar gzip en todos estos tipos de archivos
gzip_types text/plain application/javascript application/x-javascript text/javascript text/xml text/css;
# cachear gzip y la version regular de un recurso
gzip_vary on;
# deshabilitar gzip para
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
# https://mattstauffer.co/blog/enabling-gzip-on-nginx-servers-including-laravel-forge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment