From 22ca78e2198ea7a7d5fe9dd698801966492fd4c4 Mon Sep 17 00:00:00 2001 From: Delivator Date: Thu, 21 May 2020 21:59:56 +0200 Subject: [PATCH 1/3] Update skynet-nginx.conf --- setup-scripts/skynet-nginx.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup-scripts/skynet-nginx.conf b/setup-scripts/skynet-nginx.conf index bf1003e9..57e1932b 100644 --- a/setup-scripts/skynet-nginx.conf +++ b/setup-scripts/skynet-nginx.conf @@ -4,6 +4,8 @@ limit_conn_zone $binary_remote_addr zone=downloads_by_ip:10m; limit_req_status 429; limit_conn_status 429; +proxy_cache_path /temp/nginx keys_zone=skynet:10m inactive=1d; + server { listen 80 default_server; listen [::]:80 default_server; From cff9085aae35b8a4e7a3c5db84c84e0497e8e1b2 Mon Sep 17 00:00:00 2001 From: Delivator Date: Fri, 22 May 2020 17:10:58 +0200 Subject: [PATCH 2/3] Fixed cache path typo --- setup-scripts/skynet-nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup-scripts/skynet-nginx.conf b/setup-scripts/skynet-nginx.conf index 57e1932b..8c7f15fa 100644 --- a/setup-scripts/skynet-nginx.conf +++ b/setup-scripts/skynet-nginx.conf @@ -4,7 +4,7 @@ limit_conn_zone $binary_remote_addr zone=downloads_by_ip:10m; limit_req_status 429; limit_conn_status 429; -proxy_cache_path /temp/nginx keys_zone=skynet:10m inactive=1d; +proxy_cache_path /tmp/nginx keys_zone=skynet:10m inactive=1d; server { listen 80 default_server; From d18ce24136d8501d1d831a350765bf20bc16952e Mon Sep 17 00:00:00 2001 From: Delivator Date: Fri, 22 May 2020 19:27:59 +0200 Subject: [PATCH 3/3] Added levels, use_temp_path and max_size options to cache --- setup-scripts/skynet-nginx.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup-scripts/skynet-nginx.conf b/setup-scripts/skynet-nginx.conf index 8c7f15fa..16efe90c 100644 --- a/setup-scripts/skynet-nginx.conf +++ b/setup-scripts/skynet-nginx.conf @@ -4,7 +4,8 @@ limit_conn_zone $binary_remote_addr zone=downloads_by_ip:10m; limit_req_status 429; limit_conn_status 429; -proxy_cache_path /tmp/nginx keys_zone=skynet:10m inactive=1d; +# max_size sets the upper limit of the size of the cache +proxy_cache_path /tmp/nginx levels=1:2 keys_zone=skynet:10m inactive=1d max_size=10g use_temp_path=off; server { listen 80 default_server;