Forum Topic

Thanks for your participation and contribution.


Back to NGINX

NGINX Caching

Post a reply
139 views
i90runner
i90runner

Nginx caching Guide

https://www.nginx.com/blog/nginx-caching-guide/.
https://www.nginx.com/resources/wiki/start/topics/examples/reverseproxycachingexample/.

http {
    proxy_cache_path  /data/nginx/cache  levels=1:2    keys_zone=STATIC:10m
    inactive=24h  max_size=1g;
    server {
        location / {
            proxy_pass             http://1.2.3.4;
            proxy_set_header       Host $host;
            proxy_buffering        on;
            proxy_cache            STATIC;
            proxy_cache_valid      200  1d;
            proxy_cache_use_stale  error timeout invalid_header updating
                                   http_500 http_502 http_503 http_504;
        }
    }
}

1-1 of 1

Reply to this discussion

You cannot edit posts or make replies: You should be logged in before you can post.