1
#This is a basic VCL configuration file for varnish. See the vcl(7)
2
#man page for details on VCL syntax and semantics.
4
#Default backend definition. Set this to point to your content
12
#Below is a commented-out copy of the default VCL logic. If you
13
#redefine any of these subroutines, the built-in logic will be
14
#appended to your code.
17
# if (req.request != "GET" &&
18
# req.request != "HEAD" &&
19
# req.request != "PUT" &&
20
# req.request != "POST" &&
21
# req.request != "TRACE" &&
22
# req.request != "OPTIONS" &&
23
# req.request != "DELETE") {
24
# /* Non-RFC2616 or CONNECT which is weird. */
27
# if (req.request != "GET" && req.request != "HEAD") {
28
# /* We only deal with GET and HEAD by default */
31
# if (req.http.Authorization || req.http.Cookie) {
32
# /* Not cacheable by default */
39
# # Note that only the first request to the backend will have
40
# # X-Forwarded-For set. If you use X-Forwarded-For and want to
41
# # have it set for all requests, make sure to have:
42
# # set req.http.connection = "close";
43
# # here. It is not set by default as it might break some broken web
44
# # applications, like IIS with NTLM authentication.
53
# set req.hash += req.url;
54
# if (req.http.host) {
55
# set req.hash += req.http.host;
57
# set req.hash += server.ip;
63
# if (!obj.cacheable) {
74
# if (!obj.cacheable) {
77
# if (obj.http.Set-Cookie) {
80
# set obj.prefetch = -30s;
89
# /* XXX: Do not redefine vcl_discard{}, it is not yet supported */
94
# /* XXX: Do not redefine vcl_prefetch{}, it is not yet supported */
99
# /* XXX: Do not redefine vcl_timeout{}, it is not yet supported */
104
# set obj.http.Content-Type = "text/html; charset=utf-8";
106
#<?xml version="1.0" encoding="utf-8"?>
107
#<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
108
# "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
111
# <title>"} obj.status " " obj.response {"</title>
114
# <h1>Error "} obj.status " " obj.response {"</h1>
115
# <p>"} obj.response {"</p>
116
# <h3>Guru Meditation:</h3>
117
# <p>XID: "} req.xid {"</p>
120
# <a href="http://www.varnish-cache.org/">Varnish cache server</a>
1
# This is a basic VCL configuration file for varnish. See the vcl(7)
2
# man page for details on VCL syntax and semantics.
4
# Default backend definition. Set this to point to your content
12
# Below is a commented-out copy of the default VCL logic. If you
13
# redefine any of these subroutines, the built-in logic will be
14
# appended to your code.
17
# if (req.http.x-forwarded-for) {
18
# set req.http.X-Forwarded-For =
19
# req.http.X-Forwarded-For ", " client.ip;
21
# set req.http.X-Forwarded-For = client.ip;
23
# if (req.request != "GET" &&
24
# req.request != "HEAD" &&
25
# req.request != "PUT" &&
26
# req.request != "POST" &&
27
# req.request != "TRACE" &&
28
# req.request != "OPTIONS" &&
29
# req.request != "DELETE") {
30
# /* Non-RFC2616 or CONNECT which is weird. */
33
# if (req.request != "GET" && req.request != "HEAD") {
34
# /* We only deal with GET and HEAD by default */
37
# if (req.http.Authorization || req.http.Cookie) {
38
# /* Not cacheable by default */
45
# # Note that only the first request to the backend will have
46
# # X-Forwarded-For set. If you use X-Forwarded-For and want to
47
# # have it set for all requests, make sure to have:
48
# # set req.http.connection = "close";
49
# # here. It is not set by default as it might break some broken web
50
# # applications, like IIS with NTLM authentication.
59
# set req.hash += req.url;
60
# if (req.http.host) {
61
# set req.hash += req.http.host;
63
# set req.hash += server.ip;
69
# if (!obj.cacheable) {
80
# if (!beresp.cacheable) {
83
# if (beresp.http.Set-Cookie) {
94
# set obj.http.Content-Type = "text/html; charset=utf-8";
96
# <?xml version="1.0" encoding="utf-8"?>
97
# <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
98
# "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
101
# <title>"} obj.status " " obj.response {"</title>
104
# <h1>Error "} obj.status " " obj.response {"</h1>
105
# <p>"} obj.response {"</p>
106
# <h3>Guru Meditation:</h3>
107
# <p>XID: "} req.xid {"</p>
110
# <a href="http://www.varnish-cache.org/">Varnish cache server</a>