]> err.no Git - varnish/commitdiff
Rename vcl.conf to default.vcl, update and comment the sample code.
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 15 May 2007 19:38:56 +0000 (19:38 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 15 May 2007 19:38:56 +0000 (19:38 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1424 d4fa192b-c00b-0410-8231-f00ffab90ce4

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

diff --git a/varnish-cache/etc/default.vcl b/varnish-cache/etc/default.vcl
new file mode 100644 (file)
index 0000000..6b5ddbf
--- /dev/null
@@ -0,0 +1,88 @@
+#
+# This is a basic VCL configuration file for varnish.  See the vcl(7)
+# man page for details on VCL syntax and semantics.
+#
+# $Id$
+#
+
+# Default backend definition.  Set this to point to your content
+# server.
+
+backend default {
+       set backend.host = "127.0.0.1";
+       set backend.port = "8080";
+}
+
+# Below is a commented-out copy of the default VCL logic.  If you
+# redefine any of these subroutines, the built-in logic will be
+# appended to your code.
+
+## Called when a client request is received
+#
+#sub vcl_recv {
+#      if (req.request != "GET" && req.request != "HEAD") {
+#              pipe;
+#      }
+#      if (req.http.Expect) {
+#              pipe;
+#      }
+#      if (req.http.Authenticate || req.http.Cookie) {
+#              pass;
+#      }
+#      lookup;
+#}
+#
+## Called when entering pipe mode
+#
+#sub vcl_pipe {
+#      pipe;
+#}
+#
+## Called when entering pass mode
+#
+#sub vcl_pass {
+#      pass;
+#}
+#
+## Called when entering an object into the cache
+#
+#sub vcl_hash {
+#      hash;
+#}
+#
+## Called when the requested object was found in the cache
+#
+#sub vcl_hit {
+#      if (!obj.cacheable) {
+#              pass;
+#      }
+#      deliver;
+#}
+#
+## Called when the requested object was not found in the cache
+#
+#sub vcl_miss {
+#      fetch;
+#}
+#
+## Called when the requested object has been retrieved from the
+## backend, or the request to the backend has failed
+#
+#sub vcl_fetch {
+#      if (!obj.valid) {
+#              error;
+#      }
+#      if (!obj.cacheable) {
+#              pass;
+#      }
+#      if (resp.http.Set-Cookie) {
+#              pass;
+#      }
+#      insert;
+#}
+#
+## Called when an object nears its expiry time
+#
+#sub vcl_timeout {
+#      discard;
+#}
diff --git a/varnish-cache/etc/vcl.conf b/varnish-cache/etc/vcl.conf
deleted file mode 100644 (file)
index 2952613..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# 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 {
-       # pass mode can't handle POST (yet)
-        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;
-        }
-}
-