If using nginx alone (not nginx-proxy), follow:
1. copy /home/nginx/conf/globals/php-fpm.conf to /home/nginx/conf/globals/custom.php-fpm.conf
2. modified inside custom.php-fpm.conf:
from:
...
### MR -- just enough remove # below for enable nginx cache
#fastcgi_cache fcache;
fastcgi_cache_valid 200 1h;
fastcgi_cache_valid 301 1h;
fastcgi_cache_valid 302 1h;
fastcgi_cache_valid any 1m;
...
to:
...
### MR -- just enough remove # below for enable nginx cache
fastcgi_cache fcache;
#fastcgi_cache_valid 200 1h;
#fastcgi_cache_valid 301 1h;
#fastcgi_cache_valid 302 1h;
#fastcgi_cache_valid any 1m;
## for microcache
fastcgi_cache_valid 200 10s;
fastcgi_cache_use_stale updating;
fastcgi_max_temp_file_size 1M;
...
3. run 'sh /script/fixweb; sh /script/restart-web'.