FAQ

Page Discussion History

Difference between revisions of "HttpGzipStaticModule"

m (moved NginxHttpGzipStaticModule to HttpGzipStaticModule: Removing Nginx prefix from page titles)
 
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
__NOINDEX__
 +
 +
<span style="color:red">WARNING: this article is obsoleted. Please refer to http://nginx.org/en/docs/ for the latest official documentation.</span>
 +
 
= 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.
 
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.
Line 20: Line 24:
 
= Directives =
 
= Directives =
 
== gzip_static ==
 
== gzip_static ==
'''syntax:''' ''gzip_static on|off''
+
<include wikitext nopre src="http://wiki.nginx.org/nginx.org/http/ngx_http_gzip_static_module/gzip_static.txt" />
 
+
'''default:''' ''gzip_static off''
+
 
+
'''context:''' ''http, server, location''
+
  
 
Enables the module. You should ensure that the timestamps of the compressed and uncompressed files match.
 
Enables the module. You should ensure that the timestamps of the compressed and uncompressed files match.
Line 38: Line 38:
  
 
== gzip_vary ==
 
== gzip_vary ==
See [[NginxHttpGzipModule#gzip_vary| NginxHttpGzipModule]]  
+
See [[NginxHttpGzipModule#gzip_vary| NginxHttpGzipModule]]
 
+
  
 
= References =
 
= References =
[[NginxHttpGzipModule|See also: Gzip Compression Module]]
+
* [http://nginx.org/en/docs/http/ngx_http_gzip_static_module.html Original Documentation]
 +
* [[NginxHttpGzipModule|See also: Gzip Compression Module]]

Latest revision as of 11:15, 10 April 2014


WARNING: this article is obsoleted. Please refer to http://nginx.org/en/docs/ for the latest official documentation.

Contents

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;

Directives

gzip_static

Syntax: gzip_static on | off | always
Default: off
Context: http
server
location
Reference:gzip_static


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

gzip_http_version

See NginxHttpGzipModule

gzip_proxied

See NginxHttpGzipModule

gzip_disable

See NginxHttpGzipModule

gzip_vary

See NginxHttpGzipModule

References