Last active
August 29, 2015 13:59
-
-
Save fordnox/10677161 to your computer and use it in GitHub Desktop.
Most simple varnish VCL /etc/varnish/1fh.vcl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
backend default { | |
.host = "127.0.0.1"; # IP address of your backend (Apache, nginx, etc.) | |
.port = "8080"; # Port your backend is listening on | |
} | |
sub vcl_recv { | |
# Set the URI of your system directory | |
if (req.request == "POST" || req.http.X-Requested-With == "XMLHttpRequest") | |
{ | |
return (pass); | |
} | |
unset req.http.Cookie; | |
return(lookup); | |
} | |
sub vcl_fetch { | |
# Our cache TTL | |
set beresp.ttl = 1m; | |
return(deliver); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment