Sophie

Sophie

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

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_cookbook_html_cookbook_a"><a href="index.html">Index</a> &#8594; <a href="cookbook.html">Cookbook</a></h2>
<div class="sectionbody">
</div>
<h2 id="_cookbook_setting_up_kumbia_php_framework">Cookbook: Setting up Kumbia PHP Framework</h2>
<div class="sectionbody">
<div class="paragraph"><p><a href="http://www.kumbiaphp.com/">Kumbia</a> is a free web framework written
in PHP5. Configuring Cherokee to run with Kumbia is almost trivial.</p></div>
<div class="paragraph"><p>Translated from the projects
<a href="http://www.kumbiaphp.com/blog/about/">About</a> page:</p></div>
<div class="sidebarblock">
<div class="sidebar-content">
<div class="paragraph"><p>Kumbia is a free web framework written in PHP5. Based on the best web
developing practices, used in commercial and educational software,
Kumbia encourages speed and efficiency in web application creation and
maintainment, substituting repetitive coding tasks for power, control
and pleasure.</p></div>
</div></div>
<div class="paragraph"><p>First you have to unpack the package into your web hierarchy,
<tt>/var/www/kumbia_demo</tt> for example.</p></div>
<div class="paragraph"><p>Then you have to set the <tt>public</tt> subdirectory as your document web
root.</p></div>
<div class="paragraph"><p>Then, you have to set up several rules in Cherokee to rewrite the
requests. To do that, proceed to the
<a href="config_virtual_servers.html">Virtual servers</a> section. Select the
virtual server that you will be configuring and go to the <tt>Behavior</tt>
tab and <tt>Rule Management</tt> to set up the rules.</p></div>
<div class="olist arabic"><div class="title">Steps</div><ol class="arabic">
<li>
<p>
You will need to keep the rule for the <tt>php</tt> extension.
</p>
</li>
<li>
<p>
Next, configure a rule with the handler <tt>File Exists</tt> that should be
  set to a priority lower than that of the <tt>php</tt> rule.  This one can
  be set to match any file: the important thing is to check the <tt>Match
  any file</tt> checkbox. Let this rule be handled by the
  <a href="modules_handlers_file.html">Static Content</a> handler.
</p>
</li>
<li>
<p>
And last, modify your <tt>Default</tt> rule by configuring the
  <a href="modules_handlers_redir.html">redirection handler</a>, through the
  <tt>Handler</tt> tab.
</p>
<div class="tableblock">
<table rules="all"
width="100%"
frame="border"
cellspacing="0" cellpadding="4">
<col width="33%" />
<col width="33%" />
<col width="33%" />
<thead>
<tr>
<th align="left" valign="top">Type     </th>
<th align="left" valign="top">Regular Expression </th>
<th align="left" valign="top">Substitution</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top"><p class="table">Internal</p></td>
<td align="left" valign="top"><p class="table">^(.*)$</p></td>
<td align="left" valign="top"><p class="table">/index.php?url=$1</p></td>
</tr>
</tbody>
</table>
</div>
</li>
</ol></div>
<div class="paragraph"><p>This will take care of redirecting the requests to Kumbia.</p></div>
<div class="paragraph"><p>You are done with the configuration! You can now access your
application.</p></div>
</div>
<div id="footer">
<div id="footer-text">
</div>
</div>
</body>
</html>