I use nginx as a web server and I want to cache everything for my homepage "/". It's a PHP application and I'm using uWSGI with the PHP plugin.
This is in my nginx vhost configuration file:
proxy_cache_path /var/lib/nginx/ levels=1 keys_zone=cache:10m
max_size=1000m inactive=600m;
proxy_temp_path /tmp;
and:
`
location = / {
proxy_cache cache;
proxy_cache_key $host$uri;
proxy_ignore_headers Set-Cookie Cache-Control Expires;
proxy_cache_valid 200 1d;
include uwsgi_params;
uwsgi_modifier1 14;
uwsgi_pass 127.0.0.1:4001;
try_files $uri /index.php?$query_string;
}
I'm not getting anything in /var/lib/nginx. The user used for nginx is www-data, and it is the owner of everything inside /var/lib/nginx/
What I'm a missing?