Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > e3918135d52936bad0ecc8654eedea12 > files > 12

Falcon-doc-0.9.6.8-1.fc15.noarch.rpm

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" >
<head><meta content="text/html;charset=&amp;quot;utf-8&amp;quot;" http-equiv="Content-type"/><link href="faldoc.css" rel="stylesheet" type="text/css"/><title> - Micro Falcon-based web server</title></head><body class="faldoc"><ul class="navi_top"><li class="top"><a href="index.html">Top: Table of contents</a></li>
         <li class="up"><a href="WOPI.html">Up: Web Oriented Programming Interface</a></li>
         <li class="prev"><a href="WOPI_front_end_cgi_fm.html">Previous: CGI falcon module</a></li>
         <li class="next"><a href="WOPI_front_end_fcgi.html">Next: FastCGI stand-alone front-end</a></li>
         <li class="clear"></li>
         </ul><div id="page_body"><h1><span class="toc_number">5.4</span>Micro Falcon-based web server</h1><p> </p>
<p>The stand-alone web server is a simple daemon-type application listening on a TCP-IP connection and serving a single site with very basic configuration. </p>
<p>It is meant to serve static files and Falcon scripts. Prospectively, it is thought to become a primary mean for falcon-based web sites to distribute content on the net, but in this first release of WOPI it should be considered experimental and suitable for local testing of WOPI sites. </p>
<h2><a name="falhttpd_command_line">Command line</a></h2>
<p>The micro web server is started from a program called <b>falhttpd</b> (or falhttpd.exe). Some minimal configuration options can be specified on the command line, while more in depth options and MIME type mappings can be specified in a configuration file. </p>
<p>When two options are specified both on the command line and on the configuration file, the command line setting is prioritized (overrides the configuration file setting). </p>
<p>- -?: Prints a short in-line help of configuration options. <ul><li>-A <dir>: Store persistent application data files in this directory. Files are named along          the "application" declared in <b>Wopi.getData</b> and <b>Wopi.setData</b>. </li><li>-C <file>: Load this configuration file. By default, falhttpd doesn't load any configuration file. </li><li>-D <file>: Log debug information to the given file or path. By default, Log info are sent on      the console. </li><li>-h <dir>: Sets this directory as site HTDOCS root. By default, falhttpd uses its own start directory      as the document root. </li><li>-i <addr>: Bind on the named interface (defaults to 0.0.0.0 - all). </li><li>-l <n>: Log level (0 min, 5 max). The default level is 3 (all the informative messages). </li><li>-L <path>: Set this as the falcon load path. Relative paths are calculated starting from the       home document directory. The default is "." (that is, includes the startup directory). </li><li>-p <port>: Listen on required port (defaults to 80). </li><li>-q: Be quiet (don't log on console). </li><li>-S: Do not log on syslog. </li><li>-T: Set the temporary directory (the default depends on the target system). This is used      to provide the scripts with the ability to create temporary files, and also used to support      file upload control. </li></ul></p>
<h2><a name="falhttpd_config">Configuration file</a></h2>
<p>The configuration file allows a better control of some options. </p>
<p>It's structured as a pair of "key = value" entries; "#" marks a comment line. </p>
<p>Recognized keys are: </p>
<p>- <b>HomeDir</b>: Home directory of the served site. <ul><li><b>LoadPath</b>: Falcon load path that is applied to this site. </li><li><b>TempDir</b>: Sets the temporary directory. </li><li><b>Interface</b>: Address of the local interface(s) on which the application should be listening. </li><li><b>Port</b>: TCP Port number on which the application will wait for connections. </li><li><b>AllowDir</b>: Set this key to "ON" to allow connections to get the list of files in a directory       (if there isn't an active index file). </li><li><b>IndexFile</b>: one or more file names that are known to hold the "index" of a directory. If the      remote client requests an URI corresponding to a directory on the site, and a file corresponding      to one of the files listed in this key is present, that file gets served in place of the directory.      More filenames can be separated with ";". The default for this key is      "index.htm;index.html;index.fal;index.ftd". Remember to put double quotes (") around this entry. </li><li><b>PersistentDataDir</b>: Store persistent application data files in this directory. Files are named along      the "application" declared in <b>Wopi.getData</b> and <b>Wopi.setData</b>. </li></ul></p>
<h3><a name="falhttpd_mime_types">Mime types configuration</a></h3>
<p>The falhttpd server determines the mime type of the files it serves via a configuration "category" called "mime". The mime type served to the client is the part of the key past the first dot, and each dot is then transformed into a "/" separator. The Value associated with each key is a single wildcard or multiple wildcards separated by ";", matching the files that should be served with the specified mime type. </p>
<p>For example, to have documents with an .htm or .html extension served as "text/html", you should use the following entry: </p>
<pre>

   mime.text.html = "*.htm;*.html"
</pre><p>Scripts (fal, fam and ftd) can control their own mime type, so they can't be addressed by this mapping. </p>
<p>As set of minimal entries (for html, images, css and javascript) is built-in on the falhttpd, and will be disabled if mime entries are specified in the configuration file. </p>
<h4><a name="falhttpd_virtual_paths">Virtual paths</a></h4>
<p>Falhttpd supports virtual paths, or in other words, the ability to redirect all the requests for URI below a certain directory to a single script which has then the role of interpreting that URI as a request. </p>
<p>To establish a virtual path, the <b>vpath</b> configuration category must be used. The rest of the key represents the topmost entry in the virtual path, while the value is the script to be launched (relative to the start directory). </p>
<p>For example, the following entry: </p>
<pre>

   vpath.myroot.* = welcome.fal
</pre><p>will redirect every request below the URI "/myroot/" to the script "welcome.fal". Script path is relative to the directory where falhttpd is started, and can be anywhere in the system (they're not confined to the site area). </p>
<p>The script can determine the original URI stored in the request through the appropriate field in the Request object. </p>
</div><ul class="navi_bottom"><li class="top"><a href="index.html">Top: Table of contents</a></li>
         <li class="up"><a href="WOPI.html">Up: Web Oriented Programming Interface</a></li>
         <li class="prev"><a href="WOPI_front_end_cgi_fm.html">Previous: CGI falcon module</a></li>
         <li class="next"><a href="WOPI_front_end_fcgi.html">Next: FastCGI stand-alone front-end</a></li>
         <li class="clear"></li>
         </ul><div class="signature">Made with <a href="faldoc 3.0">http://www.falconpl.org</a></div></body></html>