|
|
@@ -123,7 +123,7 @@ http {
|
|
|
error_page 410 /error/410.html;
|
|
|
error_page 500 501 502 503 504 505 /error/50x.html;
|
|
|
|
|
|
- # Cache settings
|
|
|
+ # Proxy 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;
|
|
|
@@ -131,13 +131,12 @@ http {
|
|
|
proxy_cache_use_stale error timeout invalid_header http_502;
|
|
|
proxy_cache_valid any 1d;
|
|
|
|
|
|
- # FastCGI Cache settings
|
|
|
- fastcgi_cache_path /var/cache/nginx/php-fpm levels=2 keys_zone=fcgi_cache:10m inactive=60m max_size=1024m;
|
|
|
- fastcgi_cache_key "$host$request_uri $cookie_user";
|
|
|
- fastcgi_temp_path /var/cache/nginx/temp;
|
|
|
- fastcgi_ignore_headers Expires Cache-Control;
|
|
|
- fastcgi_cache_use_stale error timeout invalid_header;
|
|
|
- fastcgi_cache_valid any 1d;
|
|
|
+ # FastCGI cache
|
|
|
+ fastcgi_cache_path /var/cache/nginx/micro levels=1:2 keys_zone=microcache:10m max_size=1024m inactive=30m;
|
|
|
+ fastcgi_cache_key "$scheme$request_method$host$request_uri";
|
|
|
+ fastcgi_cache_methods GET HEAD;
|
|
|
+ fastcgi_cache_use_stale updating error timeout invalid_header http_500 http_503;
|
|
|
+ fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
|
|
|
|
|
|
# Cache bypass
|
|
|
map $http_cookie $no_cache {
|