From 1d8134f2d634809130a263ff1c4a62b89de294fa Mon Sep 17 00:00:00 2001 From: Gregory Colpart Date: Thu, 27 Oct 2022 18:21:50 +0200 Subject: [PATCH] on utilise linux-image-cloud-amd64 sur les VMs --- HowtoDebian/Install.md | 8 ++++++++ HowtoVarnish.md | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/HowtoDebian/Install.md b/HowtoDebian/Install.md index 77875b3f..cb007f10 100644 --- a/HowtoDebian/Install.md +++ b/HowtoDebian/Install.md @@ -293,3 +293,11 @@ ADMIN ALL=NOPASSWD: MAINT ~~~ trap "sudo /usr/share/scripts/evomaintenance.sh" 0 ~~~ + +* Si l'on est sur une machine virtuelle (VM), on remplace le kernel par défaut par un kernel « Cloud » : + +~~~ +# apt install linux-image-cloud-amd64 +# apt remove linux-image-amd64 +# reboot +~~~ diff --git a/HowtoVarnish.md b/HowtoVarnish.md index 4c64dab7..2c0ad87e 100644 --- a/HowtoVarnish.md +++ b/HowtoVarnish.md @@ -178,6 +178,14 @@ sub vcl_backend_response { set beresp.ttl = 3600s; } } + +sub vcl_deliver { + if (resp.http.X-Varnish ~ "[0-9]+ +[0-9]+") { + set resp.http.X-Cache = "HIT"; + } else { + set resp.http.X-Cache = "MISS"; + } +} ~~~