Welcome! Log In Create A New Profile

Advanced

fastcgi_cache and try_files

Posted by nginxx 
fastcgi_cache and try_files
December 30, 2013 07:49AM
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;
}
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 292
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready