Skip to content

Instantly share code, notes, and snippets.

@lostsquirrel
Created June 6, 2022 02:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lostsquirrel/58d282e8fc066c8ab11ada9d8e7074e0 to your computer and use it in GitHub Desktop.
Save lostsquirrel/58d282e8fc066c8ab11ada9d8e7074e0 to your computer and use it in GitHub Desktop.
proxy_cache_path /data/index levels=1:2 use_temp_path=off keys_zone=one:10m inactive=12h;
proxy_cache_path /data/package levels=1:2 use_temp_path=off keys_zone=two:10m inactive=10y;
server {
listen 80;
error_log /dev/stdout;
server_name localhost;
location / {
proxy_cache one;
proxy_cache_key $uri;
proxy_cache_valid 12h;
proxy_cache_bypass $http_x_update;
proxy_pass http://127.0.0.1:8888;
}
location ~*\.deb$ {
proxy_cache two;
proxy_cache_key $uri;
proxy_cache_valid 10y;
proxy_cache_bypass $http_x_update;
proxy_pass http://127.0.0.1:8888;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment