Created
November 17, 2011 00:10
-
-
Save jyc/1371957 to your computer and use it in GitHub Desktop.
Addition to nginx.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Compression | |
# src: http://www.ruby-forum.com/topic/141251 | |
# src: http://wiki.brightbox.co.uk/docs:nginx | |
gzip on; | |
gzip_http_version 1.0; | |
gzip_comp_level 2; | |
gzip_proxied any; | |
gzip_min_length 1100; | |
gzip_buffers 16 8k; | |
gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript; | |
# Some version of IE 6 don't handle compression well on some mime-types, so just disable for them | |
gzip_disable "MSIE [1-6].(?!.*SV1)"; | |
# Set a vary header so downstream proxies don't send cached gzipped content to IE6 | |
gzip_vary on; | |
## /Compression | |
# Load config files from the /etc/nginx/conf.d directory | |
include /etc/nginx/conf.d/*.conf; | |
include /etc/nginx/sites-enabled/*; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment