From dd9fdf83422fa2af1ec14fa4e7775c3504c4f0c6 Mon Sep 17 00:00:00 2001 From: pierre Date: Fri, 19 Jul 2024 12:01:59 +0100 Subject: [PATCH] enable proxy cache mode --- nginx.conf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nginx.conf b/nginx.conf index c0f3aa3..d3571f4 100755 --- a/nginx.conf +++ b/nginx.conf @@ -5,6 +5,7 @@ http { sendfile on; client_max_body_size 500M; + server_names_hash_bucket_size 1024; proxy_http_version 1.1; proxy_set_header X-Forwarded-Scheme $scheme; proxy_set_header Accept-Encoding ""; @@ -16,6 +17,10 @@ http { #proxy_set_header Connection 'upgrade'; #proxy_cache_bypass $http_upgrade; + gzip on; + gzip_types text/plain application/xml; + gzip_min_length 1000; + server { listen 80; @@ -39,6 +44,9 @@ http { include /etc/nginx/conf.d/*.conf; resolver 127.0.0.1 ipv6=off valid=40s; # The DNS IP server + + #https://www.tweaked.io/guide/nginx-proxying/ + proxy_cache_path /tmp/cache levels=1:2 keys_zone=cache:60m max_size=1G; }