Skip to content

Instantly share code, notes, and snippets.

@robmiller
Created January 20, 2013 20:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robmiller/4581651 to your computer and use it in GitHub Desktop.
Save robmiller/4581651 to your computer and use it in GitHub Desktop.
How to gzip certain files in nginx
server {
listen 80;
root /var/www/vhosts/example.com/;
index index.html;
location ~ "\.(css|js|txt|html)$" {
gzip on;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment