mirror of
https://github.com/joglomedia/LEMPer.git
synced 2026-04-11 15:38:43 +00:00
14 lines
526 B
Plaintext
14 lines
526 B
Plaintext
## Include this file if you want to use Nginx as transparent proxy cache
|
|
# Designed to be included in /etc/nginx/nginx.conf http{} block
|
|
|
|
proxy_cache_path /var/cache/nginx/proxy_cache levels=1:2 keys_zone=PROXYCACHE:100m max_size=1g inactive=60m use_temp_path=off;
|
|
|
|
# use stale cache on backend fault
|
|
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
|
|
|
|
# Ignore header
|
|
proxy_ignore_headers Expires Cache-Control;
|
|
|
|
# Header status
|
|
add_header X-Cache-Status $upstream_cache_status;
|