在nginx http配置段添加
fastcgi_cache_key $host$request_uri;
fastcgi_cache_path /usr/local/nginx/fastcgi_cache levels=1:2 keys_zone=TEST:10m inactive=5m;
在
fastcgi_cache TEST;
fastcgi_cache_valid 200 302 1h;
fastcgi_cache_valid 301 1d;
fastcgi_cache_valid any 1m;
fastcgi_cache_min_uses 1;
fastcgi_cache_use_stale error timeout invalid_header http_500;
红色部分是后面加上的,如果没加的话会造成php访问不正确。或者加载server段
阅读(1607) | 评论(0) | 转发(0) |