Skip to content

module for nginx http server which replace Etag value with md5sum of the static file.

Notifications You must be signed in to change notification settings

b44x/ngx_http_etags_md5

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

ngx_http_etags_md5

module for nginx http server which replace Etag value with md5sum of the static file.

Compilation and Installation

Download or clone this module into the directory you want.(in my case it was /usr/local/src). Then download nginx source in the same directory. At this point I tested this module for nginx version 1.6.0. So download command will be:

curl -O http://nginx.org/download/nginx-1.6.0.tar.gz
tar -xzf nginx-1.6.0.tar.gz
cd nginx-1.6.0

now you need to configure the module against nginx sources. To tell to configure tool about etag_md5 module type:

configure --add-module=/usr/local/src/ngx_http_etags_md5
make 
make install

Configuration

Add etagmd5 to the relevant location blocks in your nginx.conf file:

location / {
    ...
    etagmd5 on;
    etag_md5_max_size 512000;
    ...
}

As you can see there is another item called etag_md5_max_size you need to configure. md5 checksum calculation on big files can brings poor performance effect. That is why I decided to add etag_md5_max_size item, where you can specify the maximum size of the file on which this module will calculate md5 hash.

About

module for nginx http server which replace Etag value with md5sum of the static file.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 100.0%