It turns out cache is not working. Cache directory grows but server doesn't serve cached pages back.
Installed 1.1.14 on gentoo. Nothing changed.
Here is nginx.conf
============
user nobody nobody;
worker_processes 1;
error_log /var/log/nginx/error_log debug;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
log_format main
'$remote_addr - $remote_user [$time_local] '
'"$request" $status $bytes_sent '
'"$http_referer" "$http_user_agent" '
'"$gzip_ratio"';
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 20;
fastcgi_cache_path /var/cache/nginx levels=1:2 keys_zone=test_cache:32m inactive=5m;
include vhosts/*.conf;
}
============
vhost/project.conf
============
...
location ~ \.php$ {
error_page 406 = @fastcgi;
return 406;
}
location @fastcgi {
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_pass_header Cookie;
fastcgi_ignore_headers Cache-Control Expires;
fastcgi_cache test_cache;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
fastcgi_cache_use_stale error timeout invalid_header http_500;
fastcgi_cache_valid any 5m;
fastcgi_cache_min_uses 1;
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index $index;
fastcgi_param SCRIPT_FILENAME /srv/www/project/web$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT /srv/www/project/web;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
...
============
Any suggestions?