The configuration below only caches "css.php?parameter=x ..." requests. Requests like domain.com/blog/234 are not cached at all. It would be so nice of you to help me out, I tried for days solving this small issue.
http { ...
fastcgi_cache_path /tmp/php levels=1:2 keys_zone=php:10m inactive=1d;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
fastcgi_cache php;
...
server { ...
location /
{
try_files $uri /index.php?$uri&$args;
}
location ~ \.php$
{
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
http { ...
fastcgi_cache_path /tmp/php levels=1:2 keys_zone=php:10m inactive=1d;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
fastcgi_cache php;
...
server { ...
location /
{
try_files $uri /index.php?$uri&$args;
}
location ~ \.php$
{
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}