Linux server.kiran-academy.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
: 194.233.91.196 | : 216.73.216.172
Cant Read [ /etc/named.conf ]
7.4.32
finalho
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
varnish-5.2.1 /
html /
users-guide /
[ HOME SHELL ]
Name
Size
Permission
Action
command-line.html
10.23
KB
-rw-r--r--
compression.html
11.79
KB
-rw-r--r--
devicedetection.html
21.88
KB
-rw-r--r--
esi.html
11.71
KB
-rw-r--r--
increasing-your-hitrate.html
61.46
KB
-rw-r--r--
index.html
11.92
KB
-rw-r--r--
intro.html
10.24
KB
-rw-r--r--
operation-logging.html
9.3
KB
-rw-r--r--
operation-statistics.html
8.39
KB
-rw-r--r--
params.html
5.66
KB
-rw-r--r--
performance.html
10.05
KB
-rw-r--r--
purging.html
13.81
KB
-rw-r--r--
report.html
5.48
KB
-rw-r--r--
run_cli.html
15.13
KB
-rw-r--r--
run_security.html
17.29
KB
-rw-r--r--
running.html
7.21
KB
-rw-r--r--
sizing-your-cache.html
6.17
KB
-rw-r--r--
storage-backends.html
11.52
KB
-rw-r--r--
troubleshooting.html
16.57
KB
-rw-r--r--
vcl-actions.html
6.04
KB
-rw-r--r--
vcl-backends.html
21.2
KB
-rw-r--r--
vcl-built-in-subs.html
31.33
KB
-rw-r--r--
vcl-example-acls.html
5.87
KB
-rw-r--r--
vcl-example-manipulating-heade...
6.33
KB
-rw-r--r--
vcl-example-manipulating-respo...
6.47
KB
-rw-r--r--
vcl-example-websockets.html
6.95
KB
-rw-r--r--
vcl-examples.html
5.68
KB
-rw-r--r--
vcl-grace.html
9.83
KB
-rw-r--r--
vcl-hashing.html
8.52
KB
-rw-r--r--
vcl-inline-c.html
6.14
KB
-rw-r--r--
vcl-separate.html
13.18
KB
-rw-r--r--
vcl-syntax.html
10.49
KB
-rw-r--r--
vcl-variables.html
5.93
KB
-rw-r--r--
vcl.html
7.72
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : vcl-syntax.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>VCL Syntax — Varnish version 5.2.1 documentation</title> <link rel="stylesheet" href="../_static/classic.css" type="text/css" /> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', VERSION: '5.2.1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="../_static/jquery.js"></script> <script type="text/javascript" src="../_static/underscore.js"></script> <script type="text/javascript" src="../_static/doctools.js"></script> <link rel="index" title="Index" href="../genindex.html" /> <link rel="search" title="Search" href="../search.html" /> <link rel="top" title="Varnish version 5.2.1 documentation" href="../index.html" /> <link rel="up" title="VCL - Varnish Configuration Language" href="vcl.html" /> <link rel="next" title="Built in subroutines" href="vcl-built-in-subs.html" /> <link rel="prev" title="VCL - Varnish Configuration Language" href="vcl.html" /> </head> <body role="document"> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="vcl-built-in-subs.html" title="Built in subroutines" accesskey="N">next</a> |</li> <li class="right" > <a href="vcl.html" title="VCL - Varnish Configuration Language" accesskey="P">previous</a> |</li> <li class="nav-item nav-item-0"><a href="../index.html">Varnish version 5.2.1 documentation</a> »</li> <li class="nav-item nav-item-1"><a href="index.html" >The Varnish Users Guide</a> »</li> <li class="nav-item nav-item-2"><a href="vcl.html" accesskey="U">VCL - Varnish Configuration Language</a> »</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> <div class="section" id="vcl-syntax"> <h1>VCL Syntax<a class="headerlink" href="#vcl-syntax" title="Permalink to this headline">¶</a></h1> <p>VCL has inherited a lot from C and it reads much like simple C or Perl.</p> <p>Blocks are delimited by curly braces, statements end with semicolons, and comments may be written as in C, C++ or Perl according to your own preferences.</p> <p>Note that VCL doesn't contain any loops or jump statements.</p> <p>This section provides an outline of the more important parts of the syntax. For a full documentation of VCL syntax please see <a class="reference internal" href="../reference/vcl.html#vcl-7"><span class="std std-ref">VCL</span></a> in the reference.</p> <div class="section" id="strings"> <h2>Strings<a class="headerlink" href="#strings" title="Permalink to this headline">¶</a></h2> <p>Basic strings are enclosed in " ... ", and may not contain newlines.</p> <p>Backslash is not special, so for instance in <cite>regsub()</cite> you do not need to do the "count-the-backslashes" polka:</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">regsub</span><span class="p">(</span><span class="s2">"barf"</span><span class="p">,</span> <span class="s2">"(b)(a)(r)(f)"</span><span class="p">,</span> <span class="s2">"</span><span class="se">\4\3\2</span><span class="s2">p"</span><span class="p">)</span> <span class="o">-></span> <span class="s2">"frap"</span> </pre></div> </div> <p>Long strings are enclosed in {" ... "}. They may contain any character including ", newline and other control characters except for the NUL (0x00) character. If you really want NUL characters in a string there is a VMOD that makes it possible to create such strings.</p> </div> <div class="section" id="access-control-lists-acls"> <span id="vcl-syntax-acl"></span><h2>Access control lists (ACLs)<a class="headerlink" href="#access-control-lists-acls" title="Permalink to this headline">¶</a></h2> <p>An ACL declaration creates and initializes a named access control list which can later be used to match client addresses:</p> <div class="highlight-default"><div class="highlight"><pre><span></span>acl local { "localhost"; // myself "192.0.2.0"/24; // and everyone on the local network ! "192.0.2.23"; // except for the dialin router } </pre></div> </div> <p>If an ACL entry specifies a host name which Varnish is unable to resolve, it will match any address it is compared to. Consequently, if it is preceded by a negation mark, it will reject any address it is compared to, which may not be what you intended. If the entry is enclosed in parentheses, however, it will simply be ignored.</p> <p>To match an IP address against an ACL, simply use the match operator:</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="k">if</span> <span class="p">(</span><span class="n">client</span><span class="o">.</span><span class="n">ip</span> <span class="o">~</span> <span class="n">local</span><span class="p">)</span> <span class="p">{</span> <span class="k">return</span> <span class="p">(</span><span class="n">pipe</span><span class="p">);</span> <span class="p">}</span> </pre></div> </div> </div> <div class="section" id="operators"> <h2>Operators<a class="headerlink" href="#operators" title="Permalink to this headline">¶</a></h2> <p>The following operators are available in VCL. See the examples further down for, uhm, examples.</p> <dl class="docutils"> <dt>=</dt> <dd>Assignment operator.</dd> </dl> <dl class="docutils"> <dt>==</dt> <dd>Comparison.</dd> </dl> <dl class="docutils"> <dt>~</dt> <dd>Match. Can either be used with regular expressions or ACLs.</dd> </dl> <dl class="docutils"> <dt>!</dt> <dd>Negation.</dd> </dl> <dl class="docutils"> <dt>&&</dt> <dd>Logical <em>and</em></dd> </dl> <dl class="docutils"> <dt>||</dt> <dd>Logical <em>or</em></dd> </dl> </div> <div class="section" id="subroutines"> <h2>Subroutines<a class="headerlink" href="#subroutines" title="Permalink to this headline">¶</a></h2> <p>A subroutine is used to group code for legibility or reusability:</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sub</span> <span class="n">pipe_if_local</span> <span class="p">{</span> <span class="k">if</span> <span class="p">(</span><span class="n">client</span><span class="o">.</span><span class="n">ip</span> <span class="o">~</span> <span class="n">local</span><span class="p">)</span> <span class="p">{</span> <span class="k">return</span> <span class="p">(</span><span class="n">pipe</span><span class="p">);</span> <span class="p">}</span> <span class="p">}</span> </pre></div> </div> <p>Subroutines in VCL do not take arguments, nor do they return values.</p> <p>To call a subroutine, use the call keyword followed by the subroutine's name:</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">call</span> <span class="n">pipe_if_local</span><span class="p">;</span> </pre></div> </div> <p>Varnish has quite a few built in subroutines that are called for each transaction as it flows through Varnish. These builtin subroutines are all named <cite>vcl_*</cite>. Your own subroutines cannot start their name with <cite>vcl_</cite>.</p> </div> </div> </div> </div> </div> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="sphinxsidebarwrapper"> <h3><a href="../index.html">Table Of Contents</a></h3> <ul> <li><a class="reference internal" href="#">VCL Syntax</a><ul> <li><a class="reference internal" href="#strings">Strings</a></li> <li><a class="reference internal" href="#access-control-lists-acls">Access control lists (ACLs)</a></li> <li><a class="reference internal" href="#operators">Operators</a></li> <li><a class="reference internal" href="#subroutines">Subroutines</a></li> </ul> </li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="vcl.html" title="previous chapter">VCL - Varnish Configuration Language</a></p> <h4>Next topic</h4> <p class="topless"><a href="vcl-built-in-subs.html" title="next chapter">Built in subroutines</a></p> <div role="note" aria-label="source link"> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../_sources/users-guide/vcl-syntax.txt" rel="nofollow">Show Source</a></li> </ul> </div> <div id="searchbox" style="display: none" role="search"> <h3>Quick search</h3> <form class="search" action="../search.html" method="get"> <div><input type="text" name="q" /></div> <div><input type="submit" value="Go" /></div> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="vcl-built-in-subs.html" title="Built in subroutines" >next</a> |</li> <li class="right" > <a href="vcl.html" title="VCL - Varnish Configuration Language" >previous</a> |</li> <li class="nav-item nav-item-0"><a href="../index.html">Varnish version 5.2.1 documentation</a> »</li> <li class="nav-item nav-item-1"><a href="index.html" >The Varnish Users Guide</a> »</li> <li class="nav-item nav-item-2"><a href="vcl.html" >VCL - Varnish Configuration Language</a> »</li> </ul> </div> <div class="footer" role="contentinfo"> © Copyright 2010-2014, Varnish Software AS. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9. </div> </body> </html>
Close