Sophie

Sophie

distrib > Fedora > 20 > x86_64 > by-pkgid > f98ae754d110de22d0d172107b723e35 > files > 1327

cherokee-1.2.103-3.fc20.i686.rpm

<!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" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Language" content="en-us" />
    <meta name="ROBOTS" content="ALL" />
    <meta http-equiv="imagetoolbar" content="no" />
    <meta name="MSSmartTagsPreventParsing" content="true" />
    <meta name="Keywords" content="cherokee web server httpd http" />
    <meta name="Description" content="Cherokee is a flexible, very fast, lightweight Web server. It is implemented entirely in C, and has no dependencies beyond a standard C library. It is embeddable and extensible with plug-ins. It supports on-the-fly configuration by reading files or strings, TLS/SSL (via GNUTLS or OpenSSL), virtual hosts, authentication, cache friendly features, PHP, custom error management, and much more." />
    <link href="media/css/cherokee_doc.css" rel="stylesheet" type="text/css" media="all" />
  </head>
<body>
<h2 id="_a_href_index_html_index_a_8594_a_href_modules_html_modules_a_8594_a_href_modules_handlers_html_handlers_a"><a href="index.html">Index</a> &#8594; <a href="modules.html">Modules</a> &#8594; <a href="modules_handlers.html">Handlers</a></h2>
<div class="sectionbody">
</div>
<h2 id="_handler_server_side_includes">Handler: Server Side Includes</h2>
<div class="sectionbody">
<div class="paragraph"><p>Server Side Includes, also known as SSI, are directives placed in HTML
pages meant to be evaluated on the web server while the requests are
being delivered. The intended use is adding some dynamic content to
existing HTML pages without having to serve the whole content
dynamically (be it through CGI, SCGI, FastCGI, etc.).</p></div>
<div class="paragraph"><p>SSI are very useful to add small pieces of information, but are not
the way to go if the majority of the content has to be generated at
the time it is served. Traditionally the web server was notified that
it should apply SSI when it processed files ending with the <tt>.shtml</tt>
extension.</p></div>
<div class="paragraph"><p>Although this will be the majority of cases where this can be of
usefulness, Cherokee is not limited to just one file extension. The
SSI handler applies to whatever is matched by the rule where it has
been configured.</p></div>
<div class="paragraph"><p>Currently Cherokee supports the following SSI directives:</p></div>
<div class="ulist"><ul>
<li>
<p>
<em>include</em>: this tag inserts the contents of a file. Both <tt>virtual</tt>
  and <tt>file</tt> includes can be performed. The former uses paths
  beginning at the Document Root, and the latter uses paths relative
  to the current directory.
</p>
</li>
<li>
<p>
<em>fsize</em>: inserts the size of a given file.
</p>
</li>
<li>
<p>
<em>flastmod</em>: inserts the last modification date of a given file.
</p>
</li>
</ul></div>
<div class="paragraph"><p>In any of the above cases, the specified data is inserted into the
HTML page at the location of the token.</p></div>
<h3 id="examples">Examples</h3><div style="clear:left"></div>
<div class="paragraph"><p>A typical use would be using and include file for header and footer,
allowing for an easy and fast way of updating the whole theme of a
website. Only one header and footer file would have to be created, and
that could be inserted through SSI in the rest of the pages with SSI
directives like the following ones:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>   &lt;!--#include virtual="/header.html" --&gt;</tt></pre>
</div></div>
<div class="listingblock">
<div class="content">
<pre><tt>   &lt;!--#include virtual="/footer.html" --&gt;</tt></pre>
</div></div>
<div class="paragraph"><p>Note that the include element can determine what file to include based
on the <tt>virtual</tt> or <tt>file</tt> attributes, which have the behavior
specified above. In any case, despite specifying absolute or relative
paths containing <tt>..</tt>, the SSI handler will not include any files
outside the webserver document root.</p></div>
</div>
<div id="footer">
<div id="footer-text">
</div>
</div>
</body>
</html>