X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fvarnish%2Ffiles%2Fdefault.vcl;h=709801b2cf4a1e24700606014cfa688e84544fb4;hb=a6e9ddda8cc6bd47ef8324c92cd9012cf6d6df82;hp=10b51d9ff3209d5bd1e2c418f9ef72279f4c6b12;hpb=d00ed636079272459760564df20b4eb336969708;p=mirror%2Fdsa-puppet.git diff --git a/modules/varnish/files/default.vcl b/modules/varnish/files/default.vcl index 10b51d9ff..709801b2c 100644 --- a/modules/varnish/files/default.vcl +++ b/modules/varnish/files/default.vcl @@ -2,56 +2,26 @@ ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE. ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git ## +vcl 4.0; - -director packages_debian_org { - { - .backend = holter - .weight = 10000; - } - { - .backend = powell - .weight = 1; - } -} - -backend holter { - # holter.debian.org - .host = "194.177.211.202"; - .port = "80"; -} -backend powell { - # powell.debian.org - .host = "87.106.64.223"; - .port = "80"; -} - -sub vcl_recv { - - # Add a unique header containing the client address - remove req.http.X-Forwarded-For; - set req.http.X-Forwarded-For = req.http.rlnclientipaddr; - - set req.backend = packages_debian_org; - - return(lookup); +backend default { + .host = "127.0.0.1"; + .port = "80"; } -sub vcl_fetch { - if (beresp.status != 200 && beresp.status != 403 && beresp.status != 404 && beresp.status != 301 && beresp.status != 302) { +sub vcl_backend_response { +/* if (beresp.status != 200 && beresp.status != 403 && beresp.status != 404 && beresp.status != 301 && beresp.status != 302) { return(restart); - } + }*/ - # if i cant connect to the backend, ill set the grace period to be 600 seconds to hold onto content + # if I cant connect to the backend, ill set the grace period to be 600 seconds to hold onto content set beresp.ttl = 600s; set beresp.grace = 600s; if (beresp.status >= 500) { - set beresp.ttl = 0s; + set beresp.ttl = 0.1s; } - - set beresp.http.X-Cacheable = "YES"; - return(deliver); + unset beresp.http.Set-Cookie; }