FAQ

Page Discussion Edit History

NginxHttpGzipStaticModule

Contents

Edit section: Synopsis Synopsis

Before serving a file from disk to a gzip-enabled client, this module will look for a precompressed file in the same location that ends in ".gz". The purpose is to avoid compressing the same file each time it is requested.

ngx_http_gzip_static_module was introduced in nginx 0.6.24. You must enable support at compile time:

./configure --with-http_gzip_static_module

Example

gzip_static on;
 
gzip_http_version   1.1;
gzip_proxied        expired no-cache no-store private auth;
gzip_disable        "MSIE [1-6]\.";
gzip_vary           on;

Edit section: Directives Directives

Edit section: gzip_static gzip_static

syntax: gzip_static on|off

default: gzip_static off

context: http, server, location

Enables the module. You should ensure that the timestamps of the compressed and uncompressed files match.

Edit section: gzip_http_version gzip_http_version

See NginxHttpGzipModule

Edit section: gzip_proxied gzip_proxied

See NginxHttpGzipModule

Edit section: gzip_disable gzip_disable

See NginxHttpGzipModule

Edit section: gzip_vary gzip_vary

See NginxHttpGzipModule


Edit section: References References

See also: Gzip Compression Module