nginx.conf http section
proxy_cache_path /var/cache/nginx levels=2 keys_zone=cache:10m inactive=60m max_size=1024m;
proxy_cache_key "$host$request_uri $cookie_user";
proxy_temp_path /var/cache/nginx/temp;
proxy_ignore_headers Expires Cache-Control;
proxy_cache_use_stale error timeout invalid_header http_502;
proxy_cache_valid any 1d;
location config:
location / {
proxy_pass http://127.0.0.1:8080;
proxy_pass_header "X-Accel-Redirect";
proxy_pass_header "X-Accel-Expires";
proxy_cache cache;
proxy_cache_path /var/cache/nginx levels=2 keys_zone=cache:10m inactive=60m max_size=1024m;
proxy_cache_key "$host$request_uri $cookie_user";
proxy_temp_path /var/cache/nginx/temp;
proxy_ignore_headers Expires Cache-Control;
proxy_cache_use_stale error timeout invalid_header http_502;
proxy_cache_valid any 1d;
location config:
location / {
proxy_pass http://127.0.0.1:8080;
proxy_pass_header "X-Accel-Redirect";
proxy_pass_header "X-Accel-Expires";
proxy_cache cache;