Skip to content

provide etags for static contents in nginx

Notifications You must be signed in to change notification settings

soutys/nginx-static-etags

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

Nginx Static Etags

This module provides support for generating (or swapping) Etag header for static content in nginx.

Installation

Prepare location for core and/or module code:

mkdir ${HOME}/src
cd ${HOME}/src

Pull code by cloning the repositories and/or downloading packages:

# download nginx sources and unpack
curl http://nginx.org/download/nginx-1.4.4.tar.gz | tar xzf -
# download module sources
git clone https://github.com/soutys/nginx-static-etags.git ./nginx-static-etags

Compile module into nginx:

cd ./nginx-1.4.4
# add other options, modules, CFLAGS if you like...
./configure --add-module=${HOME}/src/nginx-static-etags
# multithreaded compilation is also "supported" :)
make -j4
# use root privileges or define your own `--prefix=...` option for `configure` script
sudo make install

That's (almost) all!

Configuration

Update relevant location blocks in your nginx.conf file:

location / {
    ...
    etags on;
    etag_hash on|off;
    etag_hash_method md5|sha1;
    ...
}

Optional pre/post-compilation tests

TODOs

Credits

About

provide etags for static contents in nginx

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 100.0%