I've configured a basic caching on my nginx server, but when I go to the cache storage folder, no cache files are visible. Here's my configuration:
In nginx.conf:
proxy_cache_path /usr/share/nginx/www/cache levels=1:2 keys_zone=my-cache:8m max_size=1000m inactive=600m;
proxy_temp_path /usr/share/nginx/www/cache/tmp;
And in sites-available/default:
upstream app_mydomain {
server 127.0.0.1:3000;
}
server {
listen 80;
server_name mydomain.com;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NninX-Proxy true;
proxy_pass http://app_mydomain/;
proxy_redirect off;
proxy_cache my-cache;
}
}
The permissions for the cache directory are 700, owner www-data. What do I need to add to get it caching?