Files
LEMPer/etc/nginx/proxy_cache
2019-07-23 00:53:07 +07:00

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;