add fastcgi_cache

This commit is contained in:
VirtuBox 2018-08-13 17:30:13 +02:00
parent 90609f425b
commit 33ebcef49e
1 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,17 @@
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_pass php72;
fastcgi_cache_bypass $skip_cache;
fastcgi_no_cache $skip_cache;
fastcgi_cache WORDPRESS;
fastcgi_cache_valid 60m;
}
location ~ /purge(/.*) {
fastcgi_cache_purge WORDPRESS "$scheme$request_method$host$1";
access_log off;
}
add_header X-fastcgi-cache $upstream_cache_status;