Debian – NGINX – PHP 7 cache pour booster site Web

Configuring Nginx FastCGI Cache Editer le fichier : /etc/nginx/nginx.conf

Ajouter ces 2 lignes dans la section http

fastcgi_cache_path /etc/nginx/cache levels=1:2 keys_zone=phpcache:100m inactive=60m; fastcgi_cache_key “$scheme$request_method$host$request_uri”;


Edit Nginx Server Block. vi /etc/nginx/sites-enabled/wordpress

Scroll down to the location ~ \.php$ section. Add the following lines in this section.

fastcgi_cache phpcache; fastcgi_cache_valid 200 301 302 60m; add_header X-FastCGI-Cache […]