Skip to content

Instantly share code, notes, and snippets.

@khansubhan95
Last active May 1, 2017 09:38
Show Gist options
  • Save khansubhan95/3ab5995942d5e7bad7708f104713f9fe to your computer and use it in GitHub Desktop.
Save khansubhan95/3ab5995942d5e7bad7708f104713f9fe to your computer and use it in GitHub Desktop.
gzip on; #Enable gzip
gzip_disable "msie6"; #Disable gzip for Internet Explorer 6
gzip_vary on; # Add the “Vary: Accept-Encoding” header to the response
gzip_proxied any; #Enable gzip for all proxied requests
gzip_comp_level 6; # Set gzip compression level
gzip_buffers 16 8k; # Number and size of buffers
gzip_http_version 1.1; # Minimum http version for which gzip should be used
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; # Enable gzip for the content types listed here
gzip_min_length 256; # Gzipping will be done for content at least this size
@khansubhan95
Copy link
Author

Except for the last, all the lines are present in the nginx.conf http block and are commented. Append the last line to the http block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment