]> err.no Git - varnish/commitdiff
Add sample VCL config.
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 19 Oct 2006 09:16:03 +0000 (09:16 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 19 Oct 2006 09:16:03 +0000 (09:16 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1196 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/etc/vcl.conf [new file with mode: 0644]

diff --git a/varnish-cache/etc/vcl.conf b/varnish-cache/etc/vcl.conf
new file mode 100644 (file)
index 0000000..4941503
--- /dev/null
@@ -0,0 +1,30 @@
+#
+# This is a basic VCL configuration file for varnish.  See the vcl(7)
+# man page for details on VCL syntax and semantics.
+#
+# $Id$
+#
+
+backend default {
+        set backend.host = "127.0.0.1";
+        set backend.port = "8080";
+}
+
+sub vcl_recv {
+        if (req.request == "POST") {
+                pipe;
+        }
+
+        # force lookup even when cookies are present
+        if (req.request == "GET" && req.http.cookie) {
+                lookup;
+        }
+}
+
+sub vcl_fetch {
+        # force minimum ttl of 180 seconds
+        if (obj.ttl < 180s) {
+                set obj.ttl = 180s;
+        }
+}
+