diff options
Diffstat (limited to 'historic/guix/etc/nginx/apps/drupal/microcache_fcgi_auth.conf')
-rw-r--r-- | historic/guix/etc/nginx/apps/drupal/microcache_fcgi_auth.conf | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/historic/guix/etc/nginx/apps/drupal/microcache_fcgi_auth.conf b/historic/guix/etc/nginx/apps/drupal/microcache_fcgi_auth.conf new file mode 100644 index 0000000..7b2b7c3 --- /dev/null +++ b/historic/guix/etc/nginx/apps/drupal/microcache_fcgi_auth.conf @@ -0,0 +1,51 @@ +# -*- mode: nginx; mode: flyspell-prog; ispell-local-dictionary: "american" -*- + +## The cache zone referenced. +fastcgi_cache microcache; +## The cache key. +fastcgi_cache_key $cache_uid@$scheme$request_method$host$request_uri; + +## For 200 and 301 make the cache valid for 15s. +fastcgi_cache_valid 200 301 15s; +## For 302 make it valid for 1 minute. +fastcgi_cache_valid 302 1m; +## For 404 make it valid 1 second. +fastcgi_cache_valid 404 1s; +## If there are any upstream errors use whatever it is available. +fastcgi_cache_use_stale error timeout invalid_header updating http_500; +## The Cache-Control and Expires headers should be delivered untouched +## from the upstream to the client. +fastcgi_ignore_headers Cache-Control Expires; +fastcgi_pass_header Set-Cookie; +fastcgi_pass_header Cookie; +## Bypass the cache. +# fastcgi_cache_bypass $no_auth_cache; +# fastcgi_no_cache $no_auth_cache; +## Add a cache miss/hit status header. +add_header X-Micro-Cache $upstream_cache_status; +## To avoid any interaction with the cache control headers we expire +## everything on this location immediately. +expires epoch; + +## Enable clickjacking protection in modern browsers. Available in +## IE8 also. See +## https://developer.mozilla.org/en/The_X-FRAME-OPTIONS_response_header +## This may conflicts with pseudo streaming (at least with Nginx version 1.0.12). +## Uncomment the line below if you're not using media streaming. +## For sites *not* using frames uncomment the line below. +#add_header X-Frame-Options DENY; +## For sites *using* frames uncomment the line below. +#add_header X-Frame-Options SAMEORIGIN; + +## Block MIME type sniffing on IE. +add_header X-Content-Options nosniff; + +## If you're using a Nginx version greater than 1.1.11 then uncomment +## the line below. See: +## http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_cache_lock +## Cache locking mechanism for protecting the backend of too many +## simultaneous requests. +#fastcgi_cache_lock on; +## The default timeout, i.e., the time to way before forwarding the +## second request upstream if no reply as arrived in the meantime is 5s. +#fastcgi_cache_lock_timeout 8000; # in miliseconds. |