Skip to content

Instantly share code, notes, and snippets.

@painhardcore
Created May 6, 2015 09:41
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save painhardcore/59fa32c055e7f9bb8813 to your computer and use it in GitHub Desktop.
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name защекан.рф, www.защекан.рф;
location / {
proxy_cache backcache;
proxy_cache_bypass $http_cache_control;
add_header X-Proxy-Cache $upstream_cache_status;
proxy_pass http://grabicon.com/;
}
}
http {
### Add Cache
proxy_cache_path /var/lib/nginx/cache levels=1:2 keys_zone=backcache:80m max_size=500m;
proxy_cache_key "$scheme$request_method$host$request_uri$is_args$args";
proxy_cache_valid 200 302 1d;
proxy_cache_valid 404 1m;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment