Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

fastcgi_cache and try_files

$
0
0
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;
}

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>