Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Commit

Permalink
#65: Configure port for health probe, fix typo and remove unused rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Rombauts committed Dec 13, 2017
1 parent 2ba5ba3 commit 43db6e6
Showing 1 changed file with 5 additions and 22 deletions.
27 changes: 5 additions & 22 deletions component/varnish/resources/varnish/kodekit.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ probe health
#.url = "/varnish-enabled";
# We prefer to only do a HEAD /
.request =
"HEAD /varnish-enabled HTTP/1.1"
"Host: localhost"
"Connection: close";
"HEAD / HTTP/1.1"
"Host: localhost:%1$s"
"Connection: close"
"User-Agent: Varnish Health Probe";
.interval = 5s; # check the health of each backend every 5 seconds
.timeout = 1s; # timing out after 1 second.
Expand Down Expand Up @@ -113,30 +113,13 @@ sub vcl_recv
return (pass);
}

# Specific Nooku Platform rules
# Specific Kodekit Platform rules

# Do not cache /administrator
if(req.url ~ "^/administrator") {
return (pass);
}

# Specific Nooku Server rules

# Do not cache webgrind.nooku.dev
if (req.http.host == "webgrind.nooku.dev") {
return (pass);
}

# Do not cache phpmyadmin.nooku.dev
if (req.http.host == "phpmyadmin.nooku.dev") {
return (pass);
}

# Do not cache /apc and /phpinfo
if (req.url == "/apc" || req.url == "/phpinfo") {
return (pass);
}

# Generic URL manipulation, useful for all templates that follow

# Remove the Google Analytics added parameters, useless for our backend
Expand Down Expand Up @@ -374,7 +357,7 @@ sub vcl_backend_response
# Large static files are delivered directly to the end-user without waiting for Varnish to fully read the
# file first. Check memory usage it'll grow in fetch_chunksize blocks (128k by default) if the backend
# doesn't send a Content-Length header. Only enable it for large files
if (bereq.url ~ "^[^?]*\.(7z|avi|bz2|flac|flv|gz|mka|mkv|mov|mp3|mp4|mpeg|mpg|ogg|ogm|opus|rar|tar|tgz|tbz|txz|wav|webm|xz|zip)(\?.*)?$") {
if (bereq.url ~ "^[^?]*\.(7z|avi|bz2|flac|flv|gz|mka|mkv|mov|mp3|mp4|mpeg|mpg|ogg|ogm|opus|rar|tar|tgz|tbz|txz|wav|webm|xz|zip)(\?.*)?$")
{
unset beresp.http.Set-Cookie;

Expand Down

0 comments on commit 43db6e6

Please sign in to comment.