enable proxy cache mode

This commit is contained in:
2024-07-19 12:01:59 +01:00
parent 14f38c8ec6
commit dd9fdf8342
+8
View File
@@ -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;
@@ -40,6 +45,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;
}