Created
January 16, 2011 19:09
-
-
Save pdeschen/782045 to your computer and use it in GitHub Desktop.
Base proxy and caching config for nginx.conf
This file contains 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
http { | |
... | |
#caching related | |
client_body_temp_path /var/lib/nginx/body 1 2; | |
gzip_buffers 32 8k; | |
gzip on; | |
tcp_nodelay on; | |
gzip_types | |
text/html | |
application/javascript | |
text/javascript | |
text/css | |
text/xml | |
application/atom+xml | |
application/xml; | |
proxy_cache_path /var/lib/nginx/cache levels=1:2 | |
keys_zone=staticfilecache:180m max_size=500m; | |
proxy_temp_path /var/lib/nginx/proxy; | |
proxy_connect_timeout 30; | |
proxy_read_timeout 120; | |
proxy_send_timeout 120; | |
proxy_cache_key "$scheme://$host$request_uri"; | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment