Created
June 15, 2012 12:14
-
-
Save mgronhol/2936176 to your computer and use it in GitHub Desktop.
Nginx fastcgi cachcing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Taa ensin tonne HTTP tai HTTPS blockin sisalle (esim. virtual.conf tai sitten sites-enables/default tms filuun) | |
fastcgi_cache_path /var/cache/nginx | |
levels=1:2 keys_zone=ZONE_KEY_TAHAN:10m | |
inactive=5m; | |
fastcgi_cache_key "$scheme$request_method$host$request_uri"; | |
# ja taa sitten locationiin | |
fastcgi_cache ZONE_KEY_TAHAN; | |
fastcgi_cache_valid 200 302 1m; | |
fastcgi_cache_valid 301 1m; | |
fastcgi_cache_valid any 1m; | |
fastcgi_cache_min_uses 1; | |
fastcgi_cache_use_stale error timeout invalid_header http_500; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment