@ Debian 6
_ http://library.linode.com/web-servers/nginx/installation/debian-6-squeeze
Cache Purge module
_ http://wiki.nginx.org/3rdPartyModules
_ http://wiki.nginx.org/NginxHttpProxyModule#proxy_cache_path
_ http://labs.frickle.com/nginx_ngx_cache_purge/
--with-debug_ http://www.nginx-discovery.com/2011/04/day-46-how-to-debug-location-in-nginx.html
_ http://nginx.org/en/docs/debugging_log.html
./configure \
--prefix=/opt/nginx \
--user=www-data \
--group=www-data \
--with-http_ssl_module \
--with-ipv6 \
--with-debug \
--with-http_flv_module \
--add-module=../ngx_cache_purge-1.4Configure Couch apps with caching
location @couch {
proxy_pass http://127.0.0.1:5984;
proxy_redirect off;
proxy_cache couch;
proxy_cache_valid 200 302 60m;
proxy_cache_valid 404 1m;
proxy_cache_use_stale updating;
proxy_cache_key $request_uri$is_args$args;
#proxy_set_header Host $host;
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location ~ /purge(/.*) {
proxy_cache_purge couch $1$is_args$args;
}
location ~ ^/foo {
rewrite /foo/?(.*) /db/_design/ddoc/_rewrite/$1 break;
try_files $uri @couch;
}_ http://serverfault.com/questions/30705/how-to-set-up-nginx-as-a-caching-reverse-proxy
_ http://nginx.org/en/docs/http/request_processing.html
_ http://nginx.org/en/docs/http/server_names.html