mirror of
https://github.com/bensuperpc/infrastructure.git
synced 2025-07-10 11:11:59 +02:00
Update nginx containter
Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
23
nginx/conf.d/sub/cache-fastcgi.conf
Normal file
23
nginx/conf.d/sub/cache-fastcgi.conf
Normal file
@ -0,0 +1,23 @@
|
||||
# The path to store the cache files, limit the folder to 100MB
|
||||
fastcgi_cache_path /var/run/nginx-cache-fastcgi levels=1:2 keys_zone=WORDPRESS:100m inactive=120m max_size=1g use_temp_path=off;
|
||||
|
||||
# A unique request is defined by this cache key
|
||||
fastcgi_cache_key "$scheme$request_method$host$request_uri";
|
||||
|
||||
# Show the cached version if upstream gives a timeout or a HTTP 500 error
|
||||
fastcgi_cache_use_stale error timeout invalid_header http_500;
|
||||
|
||||
# Revalidate items in the cache if they are update
|
||||
fastcgi_cache_revalidate on;
|
||||
|
||||
# Minimum time to store an item in the cache
|
||||
fastcgi_cache_min_uses 3;
|
||||
|
||||
# Cache everything for 1 day
|
||||
fastcgi_cache_valid 1d;
|
||||
|
||||
# Don't use the following headers to define the cache variables
|
||||
fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
|
||||
|
||||
# Some parts of this file are from
|
||||
# https://gist.github.com/TrafeX/6d582b6d040702088722
|
Reference in New Issue
Block a user