Настраиваю ВПСку на дебиан 9
Конфигурация
MariaDB, Nginx, Php-Fpm
скрипт - Joomla
хочу настрить кеширование nginxa
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
keepalive_requests 100000;
fastcgi_cache_path /var/www/html/nginx-cache levels=1:2 keys_zone=fastcgicache:100m inactive=600m max_size=640m;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
location ~ [^/]\.php(/|$) {
proxy_ignore_headers Expires Cache-Control;
fastcgi_cache fastcgicache; # The name of the cache key-zone to use
fastcgi_cache_valid 200 360m;
fastcgi_cache_methods GET HEAD;
add_header X-Fastcgi-Cache $upstream_cache_status; # Add header so we can see if the cache hits or misses
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; # for Ubuntu 17.04
include fastcgi_params;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
Но сервер всегда отвечает
HTTP/1.1 200 OK
Server: nginx/1.10.3
Date: Wed, 22 Nov 2017 16:01:29 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Accept-Encoding
Expires: Wed, 17 Aug 2005 00:00:00 GMT
Last-Modified: Wed, 22 Nov 2017 16:01:29 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
X-Fastcgi-Cache: MISS
Content-Encoding: gzip
X-Fastcgi-Cache: MISS - страница не кешируется и соответственно Waiting (TTFB) 600-800ms
что то неправильно настроил, файлы с кешем не создаются