~ubuntu-branches/ubuntu/trusty/varnish/trusty-proposed

« back to all changes in this revision

Viewing changes to doc/sphinx/=build/html/tutorial/vcl.html

  • Committer: Package Import Robot
  • Author(s): Stig Sandbeck Mathisen, Stig Sandbeck Mathisen, Tollef Fog Heen
  • Date: 2013-05-05 15:53:14 UTC
  • mfrom: (0.1.16)
  • Revision ID: package-import@ubuntu.com-20130505155314-i99wuol99cfwzrtv
Tags: 3.0.3-1
[ Stig Sandbeck Mathisen ]
* New upstream release

[ Tollef Fog Heen ]
* Make varnishlog's and varnishncsa's init script exit with the exit
  status of status_of_proc to make them useful.  Fixes upstream trac
  #1226.

[ Stig Sandbeck Mathisen ]
* Do not rewrite /etc/default/varnish on upgrade.
  Thanks to Andreas Beckmann <anbe@debian.org> (Closes: 698577)
* Undo mangling of /etc/default/varnish that happened during lenny->squeeze
  upgrade.
  Thanks to Andreas Beckmann <anbe@debian.org> (Closes: 698577)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
4
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
5
 
 
6
 
6
7
<html xmlns="http://www.w3.org/1999/xhtml">
7
8
  <head>
8
9
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9
10
    
10
 
    <title>Varnish Configuration Language - VCL &mdash; Varnish version 3.0.2 documentation</title>
 
11
    <title>Varnish Configuration Language - VCL &mdash; Varnish version 3.0.3 documentation</title>
 
12
    
11
13
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
12
14
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
 
15
    
13
16
    <script type="text/javascript">
14
17
      var DOCUMENTATION_OPTIONS = {
15
18
        URL_ROOT:    '../',
16
 
        VERSION:     '3.0.2',
 
19
        VERSION:     '3.0.3',
17
20
        COLLAPSE_INDEX: false,
18
21
        FILE_SUFFIX: '.html',
19
22
        HAS_SOURCE:  true
22
25
    <script type="text/javascript" src="../_static/jquery.js"></script>
23
26
    <script type="text/javascript" src="../_static/underscore.js"></script>
24
27
    <script type="text/javascript" src="../_static/doctools.js"></script>
25
 
    <link rel="top" title="Varnish version 3.0.2 documentation" href="../index.html" />
 
28
    <link rel="top" title="Varnish version 3.0.3 documentation" href="../index.html" />
26
29
    <link rel="up" title="Using Varnish" href="index.html" />
27
30
    <link rel="next" title="Statistics" href="statistics.html" />
28
31
    <link rel="prev" title="Put Varnish on port 80" href="putting_varnish_on_port_80.html" /> 
40
43
        <li class="right" >
41
44
          <a href="putting_varnish_on_port_80.html" title="Put Varnish on port 80"
42
45
             accesskey="P">previous</a> |</li>
43
 
        <li><a href="../index.html">Varnish version 3.0.2 documentation</a> &raquo;</li>
 
46
        <li><a href="../index.html">Varnish version 3.0.3 documentation</a> &raquo;</li>
44
47
          <li><a href="index.html" accesskey="U">Using Varnish</a> &raquo;</li> 
45
48
      </ul>
46
49
    </div>  
172
175
</div>
173
176
<div class="section" id="example-1-manipulating-headers">
174
177
<h2>Example 1 - manipulating headers<a class="headerlink" href="#example-1-manipulating-headers" title="Permalink to this headline">¶</a></h2>
175
 
<p>Lets say we want to remove the cookie for all objects in the /static
176
 
directory of our web server::</p>
 
178
<p>Lets say we want to remove the cookie for all objects in the /images
 
179
directory of our web server:</p>
177
180
<div class="highlight-python"><pre>sub vcl_recv {
178
181
  if (req.url ~ "^/images") {
179
182
    unset req.http.cookie;
189
192
<div class="section" id="example-2-manipulating-beresp">
190
193
<h2>Example 2 - manipulating beresp<a class="headerlink" href="#example-2-manipulating-beresp" title="Permalink to this headline">¶</a></h2>
191
194
<p>Here we override the TTL of a object comming from the backend if it
192
 
matches certain criteria::</p>
 
195
matches certain criteria:</p>
193
196
<div class="highlight-python"><pre>sub vcl_fetch {
194
197
   if (req.url ~ "\.(png|gif|jpg)$") {
195
198
     unset beresp.http.set-cookie;
268
271
<div id="searchbox" style="display: none">
269
272
  <h3>Quick search</h3>
270
273
    <form class="search" action="../search.html" method="get">
271
 
      <input type="text" name="q" size="18" />
 
274
      <input type="text" name="q" />
272
275
      <input type="submit" value="Go" />
273
276
      <input type="hidden" name="check_keywords" value="yes" />
274
277
      <input type="hidden" name="area" value="default" />
294
297
        <li class="right" >
295
298
          <a href="putting_varnish_on_port_80.html" title="Put Varnish on port 80"
296
299
             >previous</a> |</li>
297
 
        <li><a href="../index.html">Varnish version 3.0.2 documentation</a> &raquo;</li>
 
300
        <li><a href="../index.html">Varnish version 3.0.3 documentation</a> &raquo;</li>
298
301
          <li><a href="index.html" >Using Varnish</a> &raquo;</li> 
299
302
      </ul>
300
303
    </div>
301
304
    <div class="footer">
302
305
        &copy; Copyright 2010, Varnish Project.
303
 
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
 
306
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
304
307
    </div>
305
308
  </body>
306
309
</html>
 
 
b'\\ No newline at end of file'